LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 07-21-2004, 01:15 AM   #1
]un]ie
Member
 
Registered: Jul 2004
Location: Singapore
Posts: 61

Rep: Reputation: 16
Timezone funny problem.


Hi guys,
just to check if u guys encounter this funny problem.

in 1 of my machine, i changed the timezone to Hongkong, ie : TZ=Hongkong
and when i do a date, it reflects <date> <time> HKT <year>

so far soo good...but on my second machine, i do the same thing,
TZ=Honkong
But date shows <date><time>CST <year>

anyway to change the date format to show HKT in my second machine ?
 
Old 07-21-2004, 01:30 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Is the variable TZ exported on your second host ?

try, on a single line:
TZ=Hongkong date
or (with ksh or bash):
export TZ=Hongkong
date
 
Old 07-21-2004, 01:38 AM   #3
]un]ie
Member
 
Registered: Jul 2004
Location: Singapore
Posts: 61

Original Poster
Rep: Reputation: 16
hi jlliagre,
yeah...
on the first machine..i export it..it works..
but on the second, i export it...it doesn't..
first machine :

#TZ=Hongkong; export TZ
#date
<date> <time> HKT <year>

2nd machine:

#TZ=Hongkong; export TZ
#date
<date><time> CST <year>
 
Old 07-21-2004, 01:45 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Compare the output of the command:
truss -t open date
on both machines, that may give you a clue, here is what I got:

$ truss -t open date
open("/var/ld/ld.config", O_RDONLY) Err#2 ENOENT
open("/lib/libc.so.1", O_RDONLY) = 3
open("/lib/libdl.so.1", O_RDONLY) = 3
open("/usr/lib/locale/en_US.ISO8859-1/en_US.ISO8859-1.so.2", O_RDONLY) = 3
open("/usr/lib/locale/en_US.ISO8859-15/en_US.ISO8859-15.so.2", O_RDONLY) = 3
open("/usr/share/lib/zoneinfo/Hongkong", O_RDONLY) = 3
Wed Jul 21 14:44:14 HKT 2004

Last edited by jlliagre; 07-21-2004 at 01:48 AM.
 
Old 07-21-2004, 01:52 AM   #5
]un]ie
Member
 
Registered: Jul 2004
Location: Singapore
Posts: 61

Original Poster
Rep: Reputation: 16
hmm...ok...will try it..
thanks..
so tat means if it's reading from the .//zoneinfo/Hongkong file, the date should display HKT..
am i right to say tat ?
 
Old 07-21-2004, 02:24 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Correct, zdump -v Hongkong gives you more information about the zoneinfo file content.
 
Old 07-21-2004, 05:05 AM   #7
]un]ie
Member
 
Registered: Jul 2004
Location: Singapore
Posts: 61

Original Poster
Rep: Reputation: 16
cool..
thanks...
side topic...how on earth do u know soo much abt solaris jlliagre? !


hope i could get more help from you in the future bro...^_^
 
Old 07-21-2004, 11:25 AM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Well, I started being addicted with Unix in 1984 (TNIX on a Tektronix 8560):
16 bit LSI 11/23 running at a couple of Mhz, 256 KB RAM, Unix version 7, 20 MBytes hard disk, no networking, no graphics, no vi, the only editor was ed, but, at that time, all this was really cool in front of other O/S, specially the C compiler :-)

I never stopped playing with its descendance since ...

Last edited by jlliagre; 08-06-2009 at 07:04 AM.
 
Old 07-21-2004, 08:58 PM   #9
]un]ie
Member
 
Registered: Jul 2004
Location: Singapore
Posts: 61

Original Poster
Rep: Reputation: 16

tat's 10 solid years of UNIX experience....super cool~
*kowtow to Master..*

comparing...i only started Solaris 1/2 a yr ago...sighs...
thanks again for your help....
just a little more update on my previous problem...
there was nothing wrong with the SUNWloc package. just realise is diff release of solaris 8. the earlier version got this "bug", which display some eastern Asia country time zone as CST. Sun has since verify tat. unfortunately, i can't find any patch for tat...so the next best thing to do is upgrade the whole OS.

Hope to discuss with u more abt Unix/Solaris in here more often~

J.J
 
Old 07-21-2004, 09:37 PM   #10
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
oops, I mistyped 1984, so it's actually 20 years of experience ...

Concerning the S8 bug, I guess you can overcome it by telling the system directly what is the time zone shift to GMT like this:

export TZ=HKT-7
 
Old 07-21-2004, 10:08 PM   #11
]un]ie
Member
 
Registered: Jul 2004
Location: Singapore
Posts: 61

Original Poster
Rep: Reputation: 16

20 years....
super super cool~!

ok..note taken...

but it's wat it display tat's troubling my customer. this server is actually to be deploy in hongkong, so he wans it to be display <date> <time> HKT <year> just to be "satisfied" with himself.

anyway, he has agreed to purchase S9 as an upgrade, so i'm doing the upgrade for him now...
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
timezone problem Mathsniper Linux - Newbie 9 06-08-2005 12:55 PM
Evolution 2 / Multisync / WinCE Timezone problem on sync david.skinner Linux - Software 0 04-29-2005 09:58 PM
timezone problem Lord Zoltar Linux - General 5 09-13-2004 10:38 PM
Funny windows problem stabile007 General 13 09-09-2004 01:38 PM
How do I get rid of UTC (timezone problem) Baldrick65 Mandriva 2 10-02-2003 07:48 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 08:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration