datetime - Should a time within the end of DST hour be considered Winter or Summer time? -


as know, when ever our clocks go 1h (as did on 29oct @ 2:00 in countries) ending dst period, every timestamp between 1:00 , 2:00 'occurs' twice.

how should application working future events handle this?

for example user creates future event , specifies take place on 29oct @ 1:35. , let's assume standard local time utc+3 , dst utc+4

how should application convert time utc? should time considered first instance (before end of dst, makes 21:35 utc) or second instance (after end of dst, i.e. 22:35 utc)?

only can decide that. largely based on context.

in many cases, right thing choose first of 2 occurrences - daylight time. in example, run @ 1:35 in utc+4.

you need consider spring-forward transition. recurring task falls gap should usually displaced amount equal dst bias (which 1 hour). example, if clock jumps 1:59:59.999 3:00, task scheduled run @ 2:30 run @ 3:30 on day.

again, can decide right behavior application. applications may need fall event run @ standard time, or @ both times. in spring, may want run @ next instant past gap (3:00 in above example, instead of 3:30) - or may not want run @ all.

see also:


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -