Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


October 09, 2006

Don't Let Daylight Saving Time Sneak Up on You

Script determines when those fateful Sundays occur
RSS
View this exclusive article with VIP access -- click here to join |
See More VBScript Articles Here | Reprints | Or sign up for our VIP Monthly Pass!
SideBar    Daylight Saving Time Is Changing in 2007

I'm always caught off guard when that fateful Sunday rolls around when time either springs ahead or falls back an hour. The hour backward in fall isn't so bad. Although it still sneaks up on me, I don't mind having an extra hour to sleep or just relax. But that Sunday in early spring when I have to get up an hour earlier is a killer.

To make these new dates less of a rude awakening, I wrote a script named GetDLSDates.vbs. By simply double-clicking the script, I get a reminder of when daylight saving time begins and ends in the current year. Without having to change any code, this script will work the same year after year, even given the upcoming changes in daylight saving time. (For information about these changes, see the sidebar "Daylight Saving Time Is Changing in 2007.")

GetDLSDates.vbs uses Windows Management Instrumentation's (WMI's) Win32_TimeZone class to access information about the time zone and daylight saving time properties in a Windows OS. Thus, to understand how the script works, you need to know what several Win32_TimeZone class properties represent. . . .

Reader Comments
Does this work for other timezones ?
From skimming through the article I think it does as it's using an offset of GMt but just wanted to confirm.
Thanks,
Johnny

johnnypower November 04, 2007 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
WinInfo Short Takes: Week of November 24, 2008

An often irreverent look at some of the week's other news, including a Vista Capable dismissal request, Zune price reductions, Morrow musings, Novell and Microsoft sitting in a tree ... two years later, Yahoo!, IE 6 on Windows Mobile, and so much more ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

Next Version of Exchange Named Exchange 2010?

Microsoft apparently inadvertently announced the official name of the next version of Exchange Server. ...


Related Events Check out our list of Free Email Newsletters!

Scripting eBooks Keeping Your Business Safe from Attack: Encryption and Certificate Services

Best Practices for Managing Linux and UNIX Servers

Building an Effective Reporting System

Related Scripting Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing