cancel
Showing results for 
Search instead for 
Did you mean: 

TIMEZONE and /etc/tztab

Izaac
Occasional Contributor

TIMEZONE and /etc/tztab

Hi :

 

I have two servers with HP-UX 11.31.

 

 

One Show in the command "date"  CST6 time zone

 

2th  Show in the comman "date" CRST6

 

 

I have some problem with 2th  with CRST6 , i  found /etc/default/tz with CST6 value and i found /etc/TIMEZONE with CRST6  value.

 

Variable which overwrites the / etc / tztab file should have a time zone without summer changes to winter.

Also I need if I use (do not change the time in summer or winter)
/ etc / TIMEZONE
TZ = CST6

What should I do to use a TIMEZONE hours without changes

 

 

 

 

2 REPLIES
pooderbill
Valued Contributor

Re: TIMEZONE and /etc/tztab

The /usr/lib/tztab file is a series of predefined timezone specifications. The /etc/TIMEZONE file is where you set the value to be used for logins via /etc/profile. The /etc/default/tz with CST6 is just the default set by HP-UX at installation and should be manually changed to match /etc/TIMEZONE.  The value "CRST6" is not defined in the standard HP tztab file and is very likely a spelling mistake.

 

The man page: man environ will describe how the TZ variable can affect the representation of time. All time on HP-UX servers is kept in UTC time (aka, Greenwich Mean Time). The TZ variable causes the library routines for time to translate UTC into a new value. You can define a custom timezone but there is no point. You use the value that corresponds to your location. If there is not an exact match, read the environ man page and create your own entry in the tztab file. Timezones are political so there are dozens of rules in the tztab file, both for locations and for daylight saving changes.

Dennis Handly
Acclaimed Contributor

Re: TIMEZONE and /etc/tztab

>Variable which overwrites the /etc/tztab file should have a time zone without summer changes to winter.

 

Is this some place in Indiana?  Or some place in Canada near the north pole?

 

>I need if I use (do not change the time in summer or winter) TZ=CST6
>What should I do to use a TIMEZONE hours without changes

 

If you don't have the second zone name, then there is no daylight saving time.

[:]STDoffset[DST[offset][,rule]]

 

>read the environ man page and create your own entry in the tztab file.

 

You can use environ(5) to create a one time year entry.  Or tztab(4) to enter many year rules.

Be aware the later will prevent any tztab patch from being installed.

 

>so there are dozens of rules in the tztab file, both for locations and for daylight saving changes.

 

If you don't count 1/2 hours zones (India & Venezuela), there are 24 northern and 24 southern and 24 around the equator zones with and without daylight saving time.