1834454 Members
2237 Online
110067 Solutions
New Discussion

Daylight saving time

 
SOLVED
Go to solution
Shaso
Occasional Contributor

Daylight saving time

Hi,

How can I find when the system has changed the time for the "Daylight Time Saving"? Is there any logfile?

System : HP-UX 11
Thanks
13 REPLIES 13
Pete Randall
Outstanding Contributor

Re: Daylight saving time

Check the tztab entry for your timezone. That should tell you.

Pete

Pete
Robert-Jan Goossens
Honored Contributor

Re: Daylight saving time

Hi,

UX001:/etc# echo $TZ
MET-1METDST
UX001:/etc# more TIMEZONE
TZ=MET-1METDST
export TZ

Hope it helps,

Robert-Jan.
Shaso
Occasional Contributor

Re: Daylight saving time

I'm looking for a way to find out when the system actually has changed the time based on the entries in the tztab file.
Pete Randall
Outstanding Contributor

Re: Daylight saving time

OK, for example, this entry in TZTAB:

EST5EDT
0 3 6 1 1974 0-6 EDT4
0 3 22-28 2 1975 0 EDT4
0 3 24-30 4 1976-1986 0 EDT4
0 3 1-7 4 1987-2038 0 EDT4
0 1 24-30 11 1974 0 EST5
0 1 25-31 10 1975-2038 0 EST5


says, in the fifth line, that starting in 1987 and continuing through 2038, the time change will occur at 0300 hours on the first sunday in April. Quoting the man page "The first six (fields) are integer patterns that
specify the minute (0-59), hour (0-23), day of the month (1-31), month
of the year (1-12), year (1970-2038), and day of the week (0-6, with
0=Sunday)."

Now, if you'll interpret the TZTAB entry that corresponds to your timezone following these guidelines, you'll be able to tell exactly when the change occured.


Pete

Pete
James R. Ferguson
Acclaimed Contributor
Solution

Re: Daylight saving time

Hi:

There is no actual change in time. The server's clock is *not* reset. Rather, at any time (no pun intended), the value of TZ determines what *you* see as the current time, including the timezone.

As already noted, you can see the point at which the expressed timezone shifted from standard to daylight time by locating the value of TZ in '/usr/lib/tztab'.

Regards!

...JRF...
Paula J Frazer-Campbell
Honored Contributor

Re: Daylight saving time

Hi

AS James has said a time change does not occur, but what happens is the system is told that it is X hours plus or minus of the system clock.

Paula
If you can spell SysAdmin then you is one - anon
Shaso
Occasional Contributor

Re: Daylight saving time

Hi James,

Thanks for your answere. Here is what has happened:
On a server running hp-ux 11, the time has been changed on Saturday April 5. But based on the tztab file it should have been changed on Sunday;

EST5EDT

0 3 1-7 4 1987-2038 0 EDT

( TZ=EST5EDT )

How could it be possible? How can I verify/trace this?

Thanks
Pete Randall
Outstanding Contributor

Re: Daylight saving time

If the time was actually changed, then either someone with root authority issued the date command or you had a huge step in NTP synchronization (which I seriously doubt). Who else has root access? Check the su log. Ask your fellow admins. Did someone with good intentions try to "help they transition to daylight time"?

Pete

Pete
Shaso
Occasional Contributor

Re: Daylight saving time

Hi Peter,

That is the strange part, it has happened at 2am Saturday (because it did cause some problem for other applications). I've asked around and no body has done this.
Thanks
Pete Randall
Outstanding Contributor

Re: Daylight saving time

Perhaps a cron job or an at command? It really sounds to me like someone mistakenly thought that the time had to be changed manually (mistake number 1) and they did it on Saturday (mistake number 2). Check your crontab with "crontab -l". Check /var/adm/cron/log for any entries around that time.


Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: Daylight saving time

Hi (again):

You might want to look carefully at the chronology of entries in 'var/adm/syslog/syslog.log' to see if there is any evidence of time resets, although there will be nothing noted for normal standard/daylight transitions (because, really no delta in real time occurs).

Regards!

...JRF...
Bill Douglass
Esteemed Contributor

Re: Daylight saving time

If xntpd notices a time change of 1000 secords or greater, it gives up. So a time change of an hour on your box must have ben done locally.
Bill Hassell
Honored Contributor

Re: Daylight saving time

The system won't show a time change that is not in tztab. However, thisd sounds suspiciously like a cron or at job from an overly helpful sysadmin that did not understand HP-UX date handling. That is one of the reasons that good sysadmins will DISABLE the date command for any changes! On a production system, especially with database operations, the date command is very dangerous. Consider replacing /usr/bin/date with a wrapper script that gives error messages for all attempts to change the date, but allows date queries to run.


Bill Hassell, sysadmin