1850481 Members
3085 Online
104054 Solutions
New Discussion

Daylight savings time?

 
SOLVED
Go to solution
Todd Bowden
Valued Contributor

Daylight savings time?

How does the system handle Daylight savings time? Especially pertaining to log files.
2 REPLIES 2
James R. Ferguson
Acclaimed Contributor

Re: Daylight savings time?

Todd:

Yes. See man 'cron'. As for logfiles, generally if you want precise history for a long period you would log with a date and time to include the timezone. This will thus reflect EST vs EDT, for instance.

...JRF...
alberto vasquez
Trusted Contributor
Solution

Re: Daylight savings time?

Todd,

The internal time on an HP-UX system is defined as "the number of seconds elapsed since January 1, 1970, GMT". It is not until an application actually attempts to interpret this time that the Daylight Savings Time is taken into account. The tztab table (see the tztab(4) manpage) specifies when the Daylight Savings Time (if appropriate) adjustments should be made for a specific time zone, and this information is in turn used by the date(1), ctime(3C), localtime(3C), and other time-related functions and applications.

The easiest way to ensure consistency in your log files and such is to use a time format that includes the current time zone (ie, EST vs EDT) in the logfile output.