Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Day Light Saving Time - How are you testing it?

Status
Not open for further replies.

mag007

IS-IT--Management
Nov 8, 2006
99
US
As many of you know, the US Energy department changed the DST (Daylight saving time) rules to conserve energy. Major UNIX vendors: IBM, SUN, HPUX, Redhat, etc.. have created a DST patch.

My question is, how are you testing this patch before the day? Is there a way to simulate this DST?

TIA
 
I don't know if my vendor will be in business by the time to test it but if so, and they provide a patch, I'll do the testing by rebooting it 4 time with dummy dates in CMOS.

Ed Fair
Give the wrong symptoms, get the wrong solutions.
 
Here is how I plan test my system for DST compliance:

1. Apply the AIX patches
2. Reboot the system
3. Move the date a head to sometime on Saturday the 10th of March.
4. Wait to see what happens after the DST change "Sunday" morning. The date should change based on the DST algorithm of your distribution.







 
This doesn't affect me, here in the UK, but, if it did, I'd dig out all the notes from Y2K testing. Don't re-invent the wheel.

Ceci n'est pas une signature
Columb Healy
 
- apply patch
- change date & time (set 1 min. before DST)
- after 1 min verify using date cmd.
- change date & time (SET 1 min. before EST - in our case).
- after 1 min veriify using date cmd.

This is assume you have a test/devlopment server.
 
If you have no test server, you can play around with the TZ variable with a DST rule if your unix supports it and set a fake DST start and end date.

TZ is an evironment variable and you can set it differently on a test shell session - different from the system wide TZ value that is. (This is so designed, because you may have world-wide/nationwide users in different time zones from the zone the server is in.)

That way you can see what would happen on the real changeover dates.

See also my post to a similar question on the AIX forum: thread52-1330038


HTH,

p5wizard
 
I test it like this..
Code:
% zdump -v /etc/localtime | more
In the output look for
Code:
/etc/localtime  [b]Sun Mar 11 09:59:59 2007 UTC[/b] = [b]Sun Mar 11 
01:59:59 2007 PST[/b] isdst=0 gmtoff=-28800
/etc/localtime  [b]Sun Mar 11 10:00:00 2007 UTC[/b] = [b]Sun Mar 11 
03:00:00 2007 PDT[/b]v isdst=1 gmtoff=-25200
/etc/localtime  [b]Sun Nov  4 08:59:59 2007 UTC[/b] = [b]Sun Nov  4 
01:59:59 2007 PDT[/b] isdst=1 gmtoff=-25200
/etc/localtime  [b]Sun Nov  4 09:00:00 2007 UTC[/b] = [b]Sun Nov  4 
01:00:00 2007 PST[/b] isdst=0 gmtoff=-28800

M. Brooks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top