1827648 Members
3230 Online
109966 Solutions
New Discussion

Time Change

 
SOLVED
Go to solution

Time Change

Hello,

How can I know that my system will correctly change time next weekend. I am running HPUX 11i.

Thank you,
Steve
5 REPLIES 5
John Poff
Honored Contributor

Re: Time Change

Hi,

It will handle it just fine. Your system keeps track of the system time using UTC (or GMT), and the time zone is just how the date/time is represented to users.

To see how the time change will effect things like cron jobs, take a look at 'man cron', under the section "Spring and Autumn Time Transitions". It explains how it gets taken care of.

JP


P.S. Our mainframe guys still have to re-IPL their system to handle the time change. Be glad you don't support one of those. :)
Sundar_7
Honored Contributor

Re: Time Change

Steve,

man of tztab has a better explanation of how timezone changes are handled.

Just ensure your TZ is set to a correct value.

# echo $TZ
# more /etc/TIMEZONE

As long as you have a correct timezone defined, you should be good to go.

Look at /usr/lib/tztab file too.

- Sundar
Learn What to do ,How to do and more importantly When to do ?
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Time Change

There's nothing last testing it for real although on a UNIX box nothing really happens. The box simply continues to count seconds since 1-Jan-1970 00:00:00 UTC. The only thing that changes is how the time is displayed as determined by TZ and how /usr/lib/tztab modififies the behavior of the library functions localtime, strftime, et al. Bear in mind that the same UNIX box might have several TZ settings in play simultaneously.

Use the attached Perl script, dst.pl. dst.pl -u will display full usage but dst.pl -n will display the next time change. It uses exactly the same underlying function (e.g. localtime) as would be used, for example, by the date command so if dst.pl works properly, you can be confident that all is well. As a bonus, this script works under Windows as well, if you have Perl installed.

If it ain't broke, I can fix that.
Deoncia Grayson_1
Honored Contributor

Re: Time Change

Dare I just say yes and get away with it? :)

Your server should adjust the time correctly as long as your Timezone is set properly, and you can check on Monday, just by using the date command and it should show you the correct time for your Time Zone if not then you can either change it on the command line or through Sam, your choice.
If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon

Re: Time Change

Thanks everyone. I tried A. Clay's Perl script and it displayed what will happen next weekend. It's a nifty utility.

Thanks,
Steve