15.9.1.8 Daylight saving time adjustment

2010-07-19

The determination of daylight saving time (DST) should only depend on four things. The DaylightSavingTA function should return the amount of miliseconds used for DST.

- time since beginning of year: t - TimeFromYear(YearFromTime(t));
- whether t is in a leap year: InLeapYear(t)
- the week day of the beginning of the year: WeekDay(timeFromYear(YearFromTime(t)))
- the geographic location

The specification dictates that an algorithm should assume that if a locale uses DST now, it used it all the time. This prevents having to do complex calculations on when DST was and was not applied.

An implementation may map years that have the same charactaristics to the same value (if two years both either are or aren't a leap year and they both start with the same week day, the result is always the same anyways). Equivalent years should produce equivalent results.