Operating System - HP-UX
1752809 Members
6212 Online
108789 Solutions
New Discussion юеВ

Re: TZTAB Modified TIME ZONE Not Correct

 
Regina Mitchell
Frequent Advisor

Re: TZTAB Modified TIME ZONE Not Correct

These servers are located in Mexico. I'm told that server A is correct. I should have mentioned that earlier but I forgot.

So I still need to change Server B to match A.

James R. Ferguson
Acclaimed Contributor

Re: TZTAB Modified TIME ZONE Not Correct

Hi (again):

> These servers are located in Mexico. I'm told that server A is correct. I should have mentioned that earlier but I forgot.

Don't just copy 'tztab' files from server to server. Rather: (1) fetch a current patch as I noted; (2) READ the patch's special installation instructions; (3) verify and/or reset your actual UTC time; and (4) use the proper TZ setting.

There is a Mexican variation:

# TZ=CST6CDT date
Thu Oct 29 14:50:14 CDT 2009

# TZ=CST6CDT#Mexico date
Thu Oct 29 13:50:35 CST 2009

Lastly, when everything is corrected, make sure that you are running NTP (which works in UTC) to maintain an accurate server time.

Regards!

...JRF...
Dennis Handly
Acclaimed Contributor

Re: TZTAB Modified TIME ZONE Not Correct

> These servers are located in Mexico.

This is most likely broken. Mexico should not be using timezones reserved for the US. Mexico didn't follow along with the DST changes in the US.
http://www.hp.com/go/dst

>JRF: # TZ=CST6CDT#Mexico date

Right, this is better but it would be nicer if it showed "Mexico" on the date result.
Matti_Kurkela
Honored Contributor

Re: TZTAB Modified TIME ZONE Not Correct

Note that a comment in a reasonably-updated tztab file says:
----
It is recommended to use PSM8PDM, MSM7MDM, CSM6CDM and MXST6MXDT for Mexico.
Timezones PST8PDT#Mexico, MST7MDT#Mexico, CST6CDT#Mexico and MXST6MXDT#Mexico
are kept for the compatibility reasons. Content of either set is same.
----

In other words, when the new DST policy for USA (and Canada) was introduced, HP defined new timezone designators specifically for Mexico.

If you want to use the compatibility versions, remember that the "#" sign is also a comment indicator in shell scripts. Therefore it *must* be quoted in /etc/TIMEZONE, e.g.

TZ="CST6CDT#Mexico"
export TZ

MK
MK
Dennis Handly
Acclaimed Contributor

Re: TZTAB Modified TIME ZONE Not Correct

>MK: remember that the "#" sign is also a comment indicator in shell scripts. Therefore it *must* be quoted in /etc/TIMEZONE

No. A real shell must have whitespace before the "#" before it is a comment. Only the scummy C shell has a problem.
$ x=abc#def
$ echo $x
abc#def

It still may be a good idea to use quotes.