1832690 Members
2631 Online
110043 Solutions
New Discussion

Re: DST & patches

 
SOLVED
Go to solution
Jeffrey F. Goldsmith
Super Advisor

DST & patches

Last week I installed the following patches on my servers and then rebooted them. When I checked the server time Sunday morning I found that the time had not changed on any of my servers. Did I do something wrong or did I have to change the time manually? What was the patch supposed to do?

HP-UX 11.0 PHCO_36096
HP-UX 11.23 PHCO_36098

26 REPLIES 26
Patrick Wallek
Honored Contributor

Re: DST & patches

Did you verify that your /usr/lib/tztab file was updated before you rebooted?

If not, then you will need to check your current file to see what customizations are there, make note of them, and then copy the file from /usr/newconfig/usr/lib/tztab to /usr/lib/tztab and then make your custom modifications again.

You absolutely do NOT want to change your time manually.

James R. Ferguson
Acclaimed Contributor

Re: DST & patches

Hi:

Assuming the the installation was successful, you should have done nothing more than you did. You do *not* change the server's times.

Did the patch install succesfully? [Examine the 'swinstall' logs].

Is the patch marked as installed? [swlist -l patch -a patch_state PHCO_xxxxx]

Do you have an updated 'tztab' file in place that matches the patch number?
[what /usr/lib/tztab]

What is your TZ variable? [It better show both a standard and a daylight zone].

Regards!

...JRF...
Jeffrey F. Goldsmith
Super Advisor

Re: DST & patches

I took a look at /usr/lib/tztab and this is the first line:

#@(#) tztab $Date: 2007/02/22 15:09:25 $Revision: r11.23/7 PATCH_11.23 (PHCO_360
98)


I would assume that the patch was installed correctly. Am I correct?
Jeffrey F. Goldsmith
Super Advisor

Re: DST & patches

I am located in Alaska so I am using the AST10ADT. Is that correct?

Here is the patch status:

root: /root ==> swlist -l patch -a patch_state PHCO_36098
# Initializing...
# Contacting target "gravina"...
#
# Target: gravina:/
#

# PHCO_36098
# PHCO_36098.UX-CORE applied
root: /root ==>
Jeffrey F. Goldsmith
Super Advisor

Re: DST & patches

What is your TZ variable? [It better show both a standard and a daylight zone].

Where do I check the TZ variable to see if both standard and daylight zones are there?
James R. Ferguson
Acclaimed Contributor

Re: DST & patches

Hi:

If you are using AST10ADT then you have a standard/daylight transition. Post the section (stanza) for this timezone from your '/usr/lib/tztab'.

Regards!

...JRF...
Jeffrey F. Goldsmith
Super Advisor

Re: DST & patches

Is this what you wanted?

# Aleutian Standard Time, Aleutian Daylight Time (US)
AST10ADT
0 3 24-30 4 1970-1973 0 ADT9
0 3 6 1 1974 0-6 ADT9
0 3 22-28 2 1975 0 ADT9
0 3 24-30 4 1976-1986 0 ADT9
0 3 1-7 4 1987-2006 0 ADT9
0 3 8-14 3 2007-2038 0 ADT9
0 1 25-31 10 1970-1973 0 AST10
0 1 24-30 11 1974 0 AST10
0 1 25-31 10 1975-2006 0 AST10
0 1 1-7 11 2007-2038 0 AST10
James R. Ferguson
Acclaimed Contributor
Solution

Re: DST & patches

Hi (again) Jeff:

Yes, the 'tztab' shows what I expect to see and all appearances otherwise are that it is installed.

Compare the time difference between:

# echo ${TZ}
# date
# date -u

If you are in AST10ADT, you should now see a 9-hour difference from UTC.

Regards!

...JRF...
Jeffrey F. Goldsmith
Super Advisor

Re: DST & patches

Here is that informaion:

root: /usr/lib ==> echo ${TZ}
AST9ADT

root: /usr/lib ==> date
Mon Mar 12 09:41:46 AST 2007

root: /usr/lib ==> date -u
Mon Mar 12 18:41:53 UTC 2007
James R. Ferguson
Acclaimed Contributor

Re: DST & patches

Hi Jeff:

> I am located in Alaska so I am using the AST10ADT. Is that correct?

Wait, you say you use the AST10ADT rules but show a TZ=AST9EDT.

Is that a posting error? Your time delta is 9-hours as I expect but your timezone is showing standard (aSt) not daylight (aDt).

It appears that you have manufactured your own TZ for a 9-hour difference but if that TZ doesn't have a stanza of dates in the 'tztab' there is no way that you will see any shift in time offsets!

Regards!

...JRF...
Jeffrey F. Goldsmith
Super Advisor

Re: DST & patches

I noticed that I had an error too. How do I fix the problem?

James R. Ferguson
Acclaimed Contributor

Re: DST & patches

Hi (again):

Yes, now I see that *your* value for UTC is wrong by 1-hour. At some point you set your server's time wrong. See this:

http://tycho.usno.navy.mil/cgi-bin/anim

First, plan a reboot. Just before your scheduled reboot, set the date and time correctly. Use:

# date -u mmddhhmm

...NOTE that this is using UTC!!!

Next, if you are truly AST10ADT as you first said, run:

# /sbin/set_parms timezone

...and setup the correct TZ value.

Now, reboot and resume normal operations.

Regards!

...JRF...
Jeffrey F. Goldsmith
Super Advisor

Re: DST & patches

I ran the following command: # /sbin/set_parms timezone and rebooted my server. Then I checked the time again:

root: /root ==> echo ${TZ}
AST10ADT

root: /root ==> date
Mon Mar 12 10:45:47 ADT 2007

root: /root ==> date -u
Mon Mar 12 19:45:52 UTC 2007

Is this correct now? What else should I do?
James R. Ferguson
Acclaimed Contributor

Re: DST & patches

Hi Jeff:

You did NOT set your UTC time!!!

Look at what you reported for UTC and the time of your Forum post. GMT=UTC and you are one-hour wrong.

You need to *stop* your databases and other time-sensitve applicatons; then set the *correct* UTC value and reboot.

Thereafter, do yourself another favor and setup NTP. This Forum has a plethora of recent, good threads on that subject.

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: DST & patches

The confusion comes from the fact that you are logging in with TZ set to something other than GMT. The TZ variable will reformat the system time so if you set the time, it will be offset incorrectly to GMT. As mentioned, display the correct GMT value from one of the many time sources on the web, then use date -u to SET the time to GMT.

> I am located in Alaska so I am using the AST10ADT. Is that correct?

AST10ADT is the timezone definition for the Aleutian Islands only. For Anchorage or Fairbanks, etc, the timezone is not defined in tztab so you'll need to create your own entry. I haven't tested this but the entry would look something like this:

0 3 8-14 3 2007-2038 0 AKDT8
0 1 1-7 11 2007-2038 0 AKST9

Then your timezone would be set to TZ=AKST9AKDT. Note that with newer systems, you will have to reboot to refresh the system library cache so the new rules are seen. Technically, the above tztab entries are incomplete because history is not available (ie, 2006 and earlier) but I could not find a reference for Alaska time history. Here's a web page:

http://www.timeanddate.com/library/abbreviations/timezones/na/akdt.html


Bill Hassell, sysadmin
Jeffrey F. Goldsmith
Super Advisor

Re: DST & patches

I think that I have totally messed up the time on my server. Do I have to edit the tztab file and enter the Alaska time? I tried to change the time and it is still reporting the incorrect time. What it the easyist way to set the time on my server so that it is correct?
James R. Ferguson
Acclaimed Contributor

Re: DST & patches

Hi Jeff:

> What it the easyist way to set the time on my server so that it is correct?

As I noted before, the best method is to use:

# date -u mmddhhmm

That is, specify UTC (GMT) time using something like this as a reference:

http://tycho.usno.navy.mil/cgi-bin/anim

Having done that, remember that any timezone is but an offset from UTC --- a positive offset or a negative one for west of Greenwich or east, respectively.

Regards!

...JRF...
Jeffrey F. Goldsmith
Super Advisor

Re: DST & patches

James, thanks for the help. I went to the website you gave me for the time and then set my time using that.

root: /root ==> date -u 03122246

With that being done I checked my times:
root: /root ==> echo ${TZ}
AST10ADT
root: /root ==> date
Mon Mar 12 13:48:06 ADT 2007
root: /root ==> date -u
Mon Mar 12 22:48:10 UTC 2007
root: /root ==>

I thought that Alaska was 10 hours off from GMT.

Do I need to make any changes to the /usr/lib/tztab? I did modify the file and add an Alaska section. Should I remove it? What about changing the time zone parms (/sbin/set_parms timezone)?
Patrick Wallek
Honored Contributor

Re: DST & patches

Jeff,

According to this site:

http://www.time.gov/timezone.cgi?Alaska/d/-9/java

Alaska is currently 8 hours behind GMT. When we change back to Standard time in November you should be 9 hours behind.

Jeffrey F. Goldsmith
Super Advisor

Re: DST & patches

My time is one hour off right now so I should I change it using "date"? Will that mess with how my system is set now?
James R. Ferguson
Acclaimed Contributor

Re: DST & patches

Hi Jeff:

Having set your server's date/time to UTC do *not* change it again.

Bill has shown you that you need to manufacture a timezone for your area. He follows the political rules better than I do. After all, localtimes (timezones) are nothing more than artificial adjustments. Bill notes, that AST10ADT is the timezone definition for the Aleutian Islands only. Hence, follow his guidelines for creating your own TZ stanza in the 'tztab' file (cut-and-paste what he shows). Then, set your like: TZ=AKST9AKDT.

Either run '/sbin/set_parms timezone' and specify AKST9AKDT (Bill's suggestion) or simply edit '/etc/TIMEZONE' to affect the same.

Regards!

...JRF...
Jeffrey F. Goldsmith
Super Advisor

Re: DST & patches

I set the UTC time using the navel link to ensure the proper time. Next I set the timezone for the alaska time zont I created in the tztab file.

When I do a date command my server is still off by one hour. Do I need to reboot the server again?
James R. Ferguson
Acclaimed Contributor

Re: DST & patches

Hi Jeff:

> I set the UTC time using the navel [sic] link to ensure the proper time. Next I set the timezone for the alaska time zont [sic] I created in the tztab file.

OK, good.

When I do a date command my server is still off by one hour. Do I need to reboot the server again?

No, but you probably need to (at least) export the new TZ value into your environment. I assume that you set it in '/etc/TIMEZONE'. If so, log out and log back in. Then check your localtime.

You can always do:

# TZ=AKST9AKDT date

This sets the TZ variable only for the duration of the command line and allows you to see if you "like" this localtime. BItuce that there is nothing but whitespace (spaces and/or tabs) after the TZ setting and before the command. By the same token, you can verify UTC (GMT) the same way:

# TZ=GMT date

Regards!

...JRF...
Dennis Handly
Acclaimed Contributor

Re: DST & patches

>Bill: AST10ADT is the timezone definition for the Aleutian Islands only. For Anchorage or Fairbanks, etc, the timezone is not defined in tztab so you'll need to create your own entry.

Actually the correct entry is YST9YDT.
# Yukon Standard Time, Yukon Daylight Time (US)

This is Yukon as in Yukon river in Alaska, and not Yukon Canada, (the land of yellow gold).
(I just learned this last week.)