Skip to content

Instantly share code, notes, and snippets.

@rxaviers
Created October 16, 2017 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rxaviers/0e05967ea62b19496ca4a4d41e2aa050 to your computer and use it in GitHub Desktop.
Save rxaviers/0e05967ea62b19496ca4a4d41e2aa050 to your computer and use it in GitHub Desktop.
Why do we need isDst as separate property?

Time zone daylight savings change using the same time zone offset (i.e., reason why https://github.com/rxaviers/iana-tz-data uses isDst)

This is based on https://github.com/rxaviers/iana-tz-data/commit/9a553608d0d6a4e40c09f8936bf66861c67755df

(WIP document)

America/Argentina/{Buenos_Aires, Catamarca, *} @1999

/usr/share/zoneinfo/America/Argentina/Buenos_Aires Sun Oct 3 02:59:59 1999 UTC = Sat Oct 2 23:59:59 1999 -03 isdst=0 /usr/share/zoneinfo/America/Argentina/Buenos_Aires Sun Oct 3 03:00:00 1999 UTC = Sun Oct 3 00:00:00 1999 -03 isdst=1

new Date(938919600000)

Antarctica/Palmer @2016

/usr/share/zoneinfo/Antarctica/Palmer Sun Dec 4 02:59:59 2016 UTC = Sat Dec 3 23:59:59 2016 -03 isdst=1 /usr/share/zoneinfo/Antarctica/Palmer Sun Dec 4 03:00:00 2016 UTC = Sun Dec 4 00:00:00 2016 -03 isdst=0

new Date(1480820400000)

Asia/Almaty @1991

/usr/share/zoneinfo/Asia/Almaty Sat Mar 30 19:59:59 1991 UTC = Sun Mar 31 01:59:59 1991 +06 isdst=0 /usr/share/zoneinfo/Asia/Almaty Sat Mar 30 20:00:00 1991 UTC = Sun Mar 31 02:00:00 1991 +06 isdst=1

new Date(670363200000)

Asia/{Anadyr, Aqtau} @1982 @1991 @2010

new Date(386420400000) new Date(670341600000) new Date(1269698400000)

Asia/Aqtobe, Asia/Ashgabat, Asia/Ashkhabad, Asia/Baku, Asia/Chita

...

Atlantic/Stanley @1985

new Date(495601200000)

...

Europe/Saratov

Europe/Ulyanovsk @1989 @1991

new Date(606866400000) new Date(670374000000)

Europe/Volgograd @1988 @1992

new Date(701820000000) new Date(575416800000)

Pacific/Easter @1982

new Date(384922800000)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment