LZorglub / TimeZone

Alternative to Windows .Net timezone
GNU General Public License v2.0
2 stars 2 forks source link

Bug in optimized algorithm #2

Closed LZorglub closed 6 years ago

LZorglub commented 6 years ago

Values provided for America/Grand_Turk year 2018 are incorrect. The optimized algorithm (prefetch of DST changes) retrieve the wrong DST value.

Version 2.2 use now by default the normal algorithm before fix.

LZorglub commented 6 years ago

Zone start and zone end date are invalid.

Expected behavior :

  1. start utc date is equal to previous end utc date, they are no gap in utc date BUT it's not true for local date, for example Pacific/Samoa clocks were turned forward 24 hours in 2011
Zone Pacific/Apia    12:33:04 - LMT 1892 Jul  5
-11:26:56 - LMT 1911
-11:30  -   -1130   1950
-11:00  WS  -11/-10 2011 Dec 29 24:00
13:00   WS  +13/+14

In this case start local date is 31 december 2011, 00 h 00 when end local date of previous zone is 29 december 2011 24h00.

  1. When a DST occurs at the zone start/end date it must be apply for the start zone BUT not for the end date. For example, America/Grand_Turk
    -5:00   US  E%sT    2015 Nov Sun>=1 2:00
    -4:00   -   AST 2018 Mar 11 3:00

    DST must not be apply for zone end date GMT -5:00 the first sunday of november 2015

LZorglub commented 6 years ago

Fixed in 2.4