mde / timezone-js

DEPRECATED: Timezone-enabled JavaScript Date object. Uses Olson zoneinfo files for timezone data.
824 stars 183 forks source link

Summertime #129

Closed eeglob closed 4 years ago

eeglob commented 10 years ago

I am puzzled by the following tests of future dates:

new timezoneJS.Date("2017-03-26T01:00:00+0400", "Europe/Moscow") .toISOString() returns "2017-03-25T21:00:00.000Z"

new timezoneJS.Date("2017-03-26T02:00:00+0400", "Europe/Moscow") .toISOString() returns "2017-03-26T00:00:00.000Z"

NB: Russia no longer follows summer time. I assume 000Z to mean +0000 / no zone or summer time adjustment.

Am I missing something? Who can help?

longlho commented 10 years ago

Have you checked the IANA timezone rule for Russia itself? That's our data source

eeglob commented 10 years ago

It think it is updated, there is a note in it concerning dst abolishment.

Look at this: new timezoneJS.Date("2014-03-30T03:00:00+0400", "Europe/Moscow").toISOString() new timezoneJS.Date("2014-03-30T05:00:00+0400", "Europe/Moscow").toISOString() both return "2014-03-30T00:00:00.000Z"

longlho commented 10 years ago

So just wanna make sure I got the use case right:

new timezoneJS.Date("2014-03-30T03:00:00+0400", "Europe/Moscow").toISOString() should yield 2014-03-29T23:00:00.000Z?

eeglob commented 10 years ago

I would expect exactly that. Can anyone collaborate?

eeglob commented 10 years ago

new timezoneJS.Date("2014-03-30T03:00:00+0400", "Europe/Moscow").toISOString() should yield 2014-03-29T23:00:00.000Z, but does not..