07-13-2011 07:28 AM
Little confusion here. Got stuck with the Timezone format.
In HP-UX 11.11, we use TZ variable to define Timezone. its value usually set as
My confusion is:
1) how this format operates? i mean we want to set timezone as EDT, why dont we use EDT...and how do we know if the timezone is set to EDT or EST... and what is this format means like EST(timezone) 5 (numeric value) EST(timezone).
Can you please explain me this : timezone:numeric value: timezone stuff?
07-13-2011 07:36 AM
EST5EDT means 5 hours ahead of GMT and switches to Daylight Savings Time
EST5EST means 5 hours ahead of GMT and does not switch to DST
EST5CDT means 5 hours ahead of GMT, does switch, but it's actually a Central Time Zone (I think)
The simple answer for you is, most likely, EST5EDT, unless you are in a locale that does not set the clocks forward in the spring and back in the fall.
07-13-2011 07:43 AM
You can understand how HP-UX interprets the TZ variable by looking at the manpages for 'tztab(4)'. The '/usr/lib/tztab' file is cached by the libC routines which in turn, provide the standard interfaces to localtime using the TZ environmental variable.
You can also understand how Daylight Saving time works with the 'cron' daemon by reading the 'cron(1M)' manpages.
07-13-2011 07:57 AM
Unless you are in Indiana EST5EDT is the way to go.
I think EST5... means 5 hours behind GMT not ahead. Our day starts 5 hours later than GMT.
Owner of ISN Corporation
07-13-2011 10:16 AM
>EST5EDT EST5EST EST5CDT
I'm not sure why you have all 3 and not just one?
>1) how this format operates?
>Can you please explain me this: timezone:numeric value: timezone stuff?
This is all under environ(5) (TZ). And more info in tztab(4).
EST5EST means 5 hours behind of GMT and does not switch to DST
EST5CDT means 5 hours behind of GMT, does switch, but it's actually a Central Time Zone
Whether it switches or not depends on tztab(4).
If in tztab, it tells how much. If not, it will switch based on USA rules.
If you don't want it to switch, you leave off the DST field and use: EST5