Check your server DST settings using PERL

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!

- Advertisement -
- Advertisement -
- Advertisement -

2 Responses

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Other articles of interest

Global Product Review Disclosure

Disclosure: This is a global disclosure for product review articles on HighTechDad. It does not apply to Automobile reviews and there are other exceptions. Therefore, it may or may not be applicable to this particular article. I may have a material connection because I may have received a sample of a product for consideration in preparing to review the product and write this or other content. I was/am not expected to return the item after my review period. All opinions within this and other articles are my own and are typically not subject to the editorial review from any 3rd party. Also, some of the links in the post above may be “affiliate” or “advertising” links. These may be automatically created or placed by me manually. This means if you click on the link and purchase the item (sometimes but not necessarily the product or service being reviewed), I will receive a small affiliate or advertising commission. More information can be found on my About page.

About HighTechDad

Michael Sheehan (“HighTechDad”) is an avid technologist, writer, journalist, content marketer, blogger, tech influencer, social media pundit, loving husband and father of 3 beautiful girls living in the San Francisco Bay Area. This site covers technology, consumer electronics, Parent Tech, SmartHomes, cloud computing, gadgets, software, hardware, parenting “hacks,” and other tips & tricks.

Recent Articles

Explore Categories

– Advertisement –

Shop Now!

My Favorite Setapp Apps

Affiliates

Wireless in Bulk? Genius! Shop Budget-Friendly, Unlimited Talk & Text Plans at MintSIM.
  • Mount18_July
  • Shop Mount-It!

– Advertisement –

– Advertisement –