1748266 Members
3330 Online
108760 Solutions
New Discussion

TIMEZONE format

 
Vishu
Trusted Contributor

TIMEZONE format

Hi All,

 

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

 

EST5EDT

EST5EST

EST5CDT

 

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?

 

Thanks

Vishu

5 REPLIES 5
Pete Randall
Outstanding Contributor

Re: TIMEZONE format

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.


Pete
James R. Ferguson
Acclaimed Contributor

Re: TIMEZONE format

Hi:

 

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.

 

Regards!

 

...JRF...

 

 

Steven E. Protter
Exalted Contributor

Re: TIMEZONE format

Shalom,

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.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Pete Randall
Outstanding Contributor

Re: TIMEZONE format

Behind, ahead, whatever.  I thought about that for a second and decided it didn't really matter, but Thanks, Steve!


Pete
Dennis Handly
Acclaimed Contributor

Re: TIMEZONE format

>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).

 

>Pete:

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