This page demonstrates how to determine if a date falls in Daylight Saving Time or not. This JavaScript Object also demonstrates how to determine the start date and end date of Daylight Saving Time of any year based on general criteria.
DL» dst.zip
PDF» Object Details
Daylight Saving Time Detection
When attempting to determine geographic locations of website visitors, some webmasters
look to the Time Zone offset value provided by the browser. This method is only somewhat
reliable since the value provided is already adjusted for Daylight Saving Time. A visitor's
browser may report 6.0 At first glance, it would appear the visitor is in the Central Time Zone.
In fact, the visitor may be actually in Mountain Time "if" Daylight Saving Time is
in effect. This example assumes the visitor is in the Northern Hemisphere.
In order to verify the actual Time Zone offset, one must confirm whether Daylight Saving Time is
in effect. By comparing the current date with the start and end dates of Daylight Saving Time, this
fact may be determined. The JavaScript object being used in this page allows for flexible definitions
of start and end dates considering most areas of the world start and end DST on non-specific dates
like the last Sunday of October.
Example: [Northern Hemisphere - Canada]
All dates are shown in the following format: [yyyy-mm-dd]
Time Zone Offset before DST determination:
Daylight Savings Time starts
Daylight Savings Time ends
Note: The JavaScript object assumes the Time Zone setting is correct.
