The new Daylight Saving Time is almost upon us. My company is losing money now on all of the IT updates that we have to do (but that is another story, in fact, I read today that some Economic Analysts now think that the change will not save energy/money because while people won’t be using as much electricity in the evening, they WILL be using it in the morning which will offset the savings). Anyway, I was worried that a few of our servers which are running Perl scripts will be affected by the DST change. So, Googling once again, I found a Perl script that when run, will output when the system believes the time change will take place.
I cannot take credit for the script, nor can I say that it is flawless, so use at your own risk. However, I ran on several environments and got the outputs that I expected (since I have patched the machines that I ran the script on). Basically, you have to have Perl installed and you go to a DOS prompt (on Windows) or a terminal session (on Linux/Mac) and type in in the directory where you put the script:
Perl DST_check.pl
And you will get an output similar to the following:
Sun Mar 11 01:59:59 Pacific Standard Time 2007 –> Sun Mar 11 03:00:00 Daylight Time 2007
Sun Nov 04 01:59:59 Pacific Daylight Time 2007 –> Sun Nov 04 01:00:00 Pacific Standard Time 2007
The output shows when the change happens according to your system (with Timezone) and when it switches back. I have tried this on Mac and Windows and the script works great. I have not yet encountered a situation where it return a non-patched result. Anyway, the thread where I found the script and comments (including comments from the script author) is located here.
The script (which I renamed from a cryptic one) is attached Perl DST test.
Good luck with your patching and testing!
2 Responses
Here’s a site you can use to check if your workstation is ready to go:
http://dst.umn.edu/
Here’s a site you can use to check if your workstation is ready to go:
http://dst.umn.edu/