Questions tagged [dst]

DST is the tag for Daylight Saving Time issues. DST, also known as summer time, starts when a time zone shifts its clocks forward (in the spring), and ends when the clocks shift back (in the fall).

DST is the tag for Daylight Saving Time issues. Daylight Saving Time is the period when a time zone shifts its time forward in the spring (usually by one hour) and then shifts back in the fall. This creates many programming issues dealing with the lost hour in the spring, and the extra hour in the fall.

Daylight saving time is sometimes called "Summer Time", as time is changed during the summer as compared to the rest of the year. Keep in mind that the northern and southern hemispheres observe summer at different times.

Also, sometimes the term is erroneously called "daylight savings time", or just "daylight savings". Neither term is correct. There is no "s". Another erroneous term is "Day Light Savings" (or "DLS"), which is incorrect because "daylight" is a single word. All of these terms should be avoided.

To illustrate the effects of DST, consider the following graphs. These represent the daylight saving time transitions for the US Pacific time zone.

                Spring Forward DST Transition

                Fall Back DST Transition

While other time zones may transition at different points in time, the behaviors are similar. There is a "gap" of missing local time during the "spring forward" transition, and there is an "overlap" of ambiguous local time during the "fall back" transition.

These graphs also demonstrate the mathematical behaviors of the transitions:

  • Conversion from UTC to Local Time is a function over the range of all time that the local time zone was in existence.

    • However, it may not be a continuous function, due to the transitional adjustments that are made for daylight saving time.

    • Keep in mind that the local time zone was probably not always well defined, or it may have been defined using some earlier calendar system.

  • Conversion from Local Time to UTC is not a pure function because:

    • There may be a discontinuity for the "spring forward" transition, so a local time in this range would be undefined.

    • There may be a range where it is not a function at all, because there is more than one possible outcome for a single input, which occures during the "fall-back" transition.

    • This can lead to problems because some people think that you can always convert in either direction, which is false for any time zone that observes daylight saving time.

Also keep in mind that in the Northern Hemisphere, the "spring forward" transition occurs early in the year and the "fall back" transition occurs late in the year. However, in the Southern Hemisphere the seasons are inverted, so the "fall back" transition typically comes early in the year, while the "spring forward" transition comes late in the year.

Also keep in mind:

  • Not every time zone of the world uses daylight saving time. In fact, the majority do not. See this Wikipedia Article for details.

  • Of those that uses it, each time zone decides how DST applies. Different countries will start and end daylight time at different dates.

  • Not every time zone transitions by one hour. For example, the Australia/Lord_Howe time zone only shifts by 30 minutes.

  • Governments of the world often make changes to how they want to follow DST. You cannot assume that the current rules have always applied in the past or always will apply in the future.

  • DST transition days will have less or more actual time than 24 hours. In most cases, spring-forward days will have 23 hours, and fall-back days will have 25.

  • There are not always exactly a single pair of DST transitions in a given year. Other real-world cases include:

    • One spring transition : This occurs when a time zone decides to stay on "permanent summer time". For example, in 2015 the Turks and Caicos Islands sprung forward in March and stayed there. This is often modeled as a change in base-offset from UTC-5 to UTC-4.

    • One fall transition : This occurs when a time zone that was on "permanent summer time" switches back to standard time. This occurred across Russia in 2014.

    • Two transitions : This is the common case.

    • Three transitions : This is much rarer, but occurred in 2011 in Samoa. The first two transitions were for DST, and the third occurred when 24 hours were skipped to change the island's base-offset from UTC-10 to UTC+14.

    • Four transitions : This occurs when a country that observes DST decides to suspend it temporarily. This has been done in both Egypt and Morocco for the observation of Ramadan.

1319 questions
-1
votes
2 answers

Enable and disable DST on Windows OS by code

Are there any way to enable and disable DST (Daylight Saving Time) on Windows OS by code? I have been following the steps mentioned on the next link, but without success... Also I have been trying changing "Bias" property of…
Alberto Bricio
  • 402
  • 1
  • 6
  • 22
-1
votes
1 answer

Convert UTC Time To Local DST Time

I want to convert UTC time to local Time Zone where Time Zone will be dyanamic. The question is asked because I want my UTC date to get converted automatically using DayLightSaving Time. DayLightSaving for Adelaide on 2019-04-25 is +4 hours and…
Akki
  • 61
  • 1
  • 2
  • 10
-1
votes
1 answer

Get current Timezone offset from offset saved before daylight started

I have saved utc date with client timezone offset as -570 of australia/adelaide which was offset before DAY LIGHT SAVING STARTED . Now I need to find the current offset using -570 after daylight saving has started using php code? Is there any…
UFO24
  • 3
  • 4
-1
votes
1 answer

IsDaylightSavingTime is triggered at 1:00 instead of 2:00

I'm simply trying to determine if a given date falls within Daylight Saving Time. In 2017, Nov 5th at 2:00 AM should be the trigger. If my input is 11/5/17 00:00:00 the output is true for DST If my input is 11/5/17 01:00:00 the output is false for…
stackoverfloweth
  • 6,669
  • 5
  • 38
  • 69
-1
votes
2 answers

How do I know Daylight Saving Time just went off when it JUST went back an hour?

I'm not in front of my code right now, but don't really think I need it to ask this question. So I have a countdown timer that goes off every 18 hours and then resets. The timer checks the current DateTime.Now and adjusts the countdown timer as…
Nolemonpledge
  • 139
  • 1
  • 2
  • 11
-1
votes
3 answers

Getting ZoneId from a SimpleTimeZone

Using Java I have a SimpleTimeZone instance with GMT offset and daylight saving time information from a legacy system. I would like to retrieve ZoneId to be able to use Java 8 time API. Actually, toZoneId returns a ZoneId without the daylight Saving…
Woody
  • 809
  • 8
  • 21
-1
votes
1 answer

Convert US/Eastern to UTC including daylight savings Python

I was really surprised to not find an easy way to do this in Python. We wrote this in December and it passed, because it was winter: def get_utc_time(dt_or_str, number_of_days=None, time_format=DATETIME_FORMAT): """ :param dt_or_str: …
codyc4321
  • 9,014
  • 22
  • 92
  • 165
-1
votes
1 answer

How to find out if the current local time is in daylight savings

GetTimeZoneInformation fills up a TIME_ZONE_INFO struct with all sorts of useful information. Except it doesn't actually tell me if the current local time zone is in daylight savings or not. For that matter, I'm in New York and the StandardBias and…
stu
  • 8,461
  • 18
  • 74
  • 112
-1
votes
2 answers

Daylight Saving Time in Javascript

I am running my web apps in UTC+0530 timezone. I want to find the daylight saving time of UTC+0000 time zone. Is it possible in javascript?
Varatharaj
  • 688
  • 6
  • 12
-1
votes
1 answer

Timezone and summertime CodeIgniter

I search the better solution for view the local time for all users of my website. I got a problem with summer time, actually i got this function if you got a better way help me : function timezone_by_offset($offset) { $abbrarray =…
Rodo
  • 3
  • 4
-1
votes
1 answer

Updating Day Light Saving time properties for JDK 1.6

How and where to update JDK 1.6, Daylight Saving Time properties ? Kindly provide me a solution for both windows and linux platforms.
-1
votes
1 answer

DST API - is there any free service?

I am trying to build an automatic alert (lotusscript based) to our remote location users to remind that DST is US / UK is going to be set/reset so that they would be prepared for meetings accordingly in advance. US/UK guys would know it as they…
Kalyan
  • 27
  • 1
  • 10
-1
votes
2 answers

How to deal with datetime column when some are adjusted for DST?

I am doing some comparisons between datetime in MySQL with PHP. In MySQL time is incremented by 1 between Nov 2, 2014 and March 8, 2015 due to daylight saving time. So far I have if statements that check whether I need to subtract 1 hour before…
jump3r
  • 161
  • 1
  • 7
-1
votes
1 answer

PHP's Date function for Day light saving

Is PHP's native date() function return Time according to DST? Let's consider example here. Timezone set in php.ini is America/New_York.If we consider Tue, 20 Dec 2011 20:57:45 +0000 then is it display date Tue, 20 Dec 2011 15:57:45 -0500 or -0400…
Deval Shah
  • 1,094
  • 8
  • 22
-1
votes
1 answer

Event is not adding on correct time in Google calendar

I've created an ASP.net application and I'm using Google Calendar API (Google.GData.Calendar) to schedule/add an event in Google calendar. FYI, My client is from South Australia and my site is hosted on Godaddy India server. In Australia from Oct to…
Devendra
  • 47
  • 1
  • 1
  • 7
1 2 3
87
88