Switch to daylight saving time schedule for time limit

I am coding a planning application and am curious how to handle the following limit situation regarding daylight saving time (DST) changes:

Let's say we are in the time zone where DST is:

  • Starts at 2014-Mar-9at 2:00:00 AM(clock adjusted forward)
  • Ends 2014-Nov-2at 2:00:00 AM(clock adjusted backward)

Suppose the end user has scheduled my application for 2014-Nov-2, 2:00:00 AM.

Suppose the local date / time is now 2014-Nov-2, 1:59:99 AM.

When does my application start the schedule - after 1 second or after 1 hour and 1 second?

Is there a standard that defines how to deal with this situation?

+4
source share
2 answers

According to wikipedia , the rules for daylight saving time are:

... in spring, the clock jumps from the last moment 01:59 DST to 03:00 DST, and this day has 23 hours, while in autumn the clock bounces back from the last moment 01:59 DST to 01:00 DST, repeating this hour, and this day is 25 hours. [37] The digital display of local time does not read 02:00 exactly when daylight saving time changes, but instead jumps from 01: 59: 59.9 forward to 03: 00: 00.0 .

Thus, although the time and date are different throughout the world, the rules are similar (ignoring the Australian Lord Howe Island, which uses half an hour). The hour that jumps back or forward does not apply, but the hour that he jumped at.

, , .

, 3 , , (2-3 = 1 ).

+3

, ", " , .

, , , , ( spring DST-) ( DST-). - ", ". - " 1:30 PDT (UTC-7) 1:30 PST (UTC-8)?" .

, , . ?

  • 2:00 , spring 1:59:59 3:00:00, , 3:00:00. , , , 4:00:00 - . , , 2:00 .

  • 1:00 , 1:59:59 1:00:00 - , ( ). .

    , . , , ? ", , DST-, . 1:00". - , , , .

, , . , - , . , .

, DST . DST. .

DST . DST.

+1

Source: https://habr.com/ru/post/1537641/


All Articles