Operating System - HP-UX
1834804 Members
2199 Online
110070 Solutions
New Discussion

Urgent help. Time Zone Setting

 
SOLVED
Go to solution
Kenn Chen
Advisor

Urgent help. Time Zone Setting

currently, my server date and time is same as another server (non-hpux) but the application shown the time is defferent. We suspected is the time zone different. How could check whether our time zone is GMT + 8 or - 8 (-288000). If i want to change the setting , how to change it and any impact of changing this. Thanks.
Cyber Zen
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Urgent help. Time Zone Setting

Hi:
First of all it is perfectly safe to change the timezone to any valur you like. This only affects how the date/time is displayed not how system time is stored. Internally, all UNIX boxes in the known universe simply count seconds since Jan 1, 1970 UTC and internal dates and file datestamps are recorded simply as this number of seconds. Individual users can have different displayed times by altering the TZ variable.

To check your setting, echo $TZ. The format will be something like this:
CST6CDT. Which translates to 'Central Standard Time', 6 hours West of Greenwich, 'Central Daylight Time (Summer Time)'.
You can simply set and export TZ to try different settings and again this has no impact on the system other than how time is displayed in this shell and its child processes.
Man environ (5) for details; when you find a value that is appropriate, edit /etc/TIMEZONE and set the value.
If you enter a negative hours offset in the TZ
variable that is interpreted to mean hours east of Greenwich.

The proper use is to use /etc/TIMEZONE to set the most common timezone (or often that of the machine's physical location) and then to use each user's .profile to override the value if required.

Hope this helps, Clay
If it ain't broke, I can fix that.
Kong Kian Chay
Regular Advisor

Re: Urgent help. Time Zone Setting

Hi, your /etc/TIMEZONE should show :--

TZ=SST-8
export TZ

Kong Kian Chay
Regular Advisor

Re: Urgent help. Time Zone Setting

Would like to add that your country's Time Zone (M'sia) is "GMT +8 hours" -- East of GreenWich.
Kong Kian Chay
Regular Advisor

Re: Urgent help. Time Zone Setting

WAI CHUAN

Sorry, would like to clarify that "SST-8" is specially for Singapore (SST - Singapore Std Time). S'pore is also GMT +8 Hours, 8 Hours East of Greenwich. You can either use "SST-8" or the standard convention as described in "man environ".