Daylight Saving Time Test

Anonymous
Anonymous

Determine if your System Clock is on DST

Version
1.0.0.0

Requirements
Tested on WinXP and Win2000

Description
This Function reads two registry settings, to determine whether the system clock is compensating for Daylight Saving Time.

The code reads two entries, the 'ActveTimeBias' and the 'Bias' from the TimeZoneInformation section of the windows registry.

The 'Normal' time bias is the usual time variation from GMT, whereas the 'ActiveTimeBias' is the variation actually being used. If they are not equal,
then the system clock is adding compensation for Daylight Saving Time.

USAGE:

* Copy the BAS to the project directory - will automatically be added as a CiVBA function to your project.
* Modify the BAS, insert TAG to toggle, or message to display where the comments indicate
- Default will display a message box saying "Daylight Savings!!" or "Normal Time"
* Then you can access the function via a button, just like a normal CiVBA function using:

CiVBA
CheckDaylight

* or via cicode by calling:

vbcallrun(VbCallOpen("CheckDaylight"));

* Or instead of a button, use a timed event to check the status on a regular basis.

Author
Warwick Black

Submitter
Warwick Black

Attachments