Unix Technical Forum

Date format question

This is a discussion on Date format question within the comp.unix.solaris forums, part of the Solaris Operating System category; --> Hi, I have two Solaris x86 (one on VM Player): # /usr/bin/date Wednesday, May 14, 2008 7:42:43 AM HKT ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > comp.unix.solaris

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-16-2008, 02:32 PM
Mr. Chow Wing Siu
 
Posts: n/a
Default Date format question

Hi,

I have two Solaris x86 (one on VM Player):

# /usr/bin/date
Wednesday, May 14, 2008 7:42:43 AM HKT

# /usr/bin/date
Wed May 14 07:42:45 HKT 2008

Would anyone tell me why they are? Thank you very much.

--
Johnson Chow
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-16-2008, 02:32 PM
Dave
 
Posts: n/a
Default Re: Date format question

Mr. Chow Wing Siu wrote:
> Hi,
>
> I have two Solaris x86 (one on VM Player):
>
> # /usr/bin/date
> Wednesday, May 14, 2008 7:42:43 AM HKT
>
> # /usr/bin/date
> Wed May 14 07:42:45 HKT 2008
>
> Would anyone tell me why they are? Thank you very much.
>
> --
> Johnson Chow


Looking at the date(1) man page:



********************
Specifications of native language translations of month and
weekday names are supported. The month and weekday names
used for a language are based on the locale specified by the
environment variable LC_TIME. See environ(5).

The following is the default form for the "C" locale:

%a %b %e %T %Z %Y

For example,

Fri Dec 23 10:10:42 EST 1988
*********************

On my SPARC, which is using the C locale, I get the following.


bash-3.00$ /usr/bin/date
Wed May 14 05:08:28 BST 2008
bash-3.00$ locale
LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=

I don't have an x86 based box around here at the minute - I loaned my
laptop to my Dad, who was getting withdrawal symptoms after his laptop
have to go in for repair!










Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-16-2008, 02:32 PM
Mr. Chow Wing Siu
 
Posts: n/a
Default Re: Date format question

Dave <foo@coo.com> wrote:
> On my SPARC, which is using the C locale, I get the following.
> bash-3.00$ /usr/bin/date
> Wed May 14 05:08:28 BST 2008
> bash-3.00$ locale
> LANG=C
> LC_CTYPE="C"
> LC_NUMERIC="C"
> LC_TIME="C"
> LC_COLLATE="C"
> LC_MONETARY="C"
> LC_MESSAGES="C"
> LC_ALL=


> I don't have an x86 based box around here at the minute - I loaned my
> laptop to my Dad, who was getting withdrawal symptoms after his laptop
> have to go in for repair!

------------------------------------------

My answer:

/etc/default/init (Wednesday, May 14, 2008 7:42:43 AM HKT)

TZ=Asia/Hong_Kong
CMASK=022
LC_COLLATE=en_US.ISO8859-1
LC_CTYPE=en_US.ISO8859-1
LC_MESSAGES=C
LC_MONETARY=en_US.ISO8859-1
LC_NUMERIC=en_US.ISO8859-1
LC_TIME=en_US.ISO8859-1

/etc/default/init (Wed May 14 07:42:45 HKT 2008)

TZ=Asia/Hong_Kong
CMASK=022
LANG=C

I used jumpstart to install Solaris x86 on vmplayer. Therefore
it gives such the problem. Thanks for help.

--
Johnson Chow
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:11 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com