Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong timestamp for dates in transition period between GMT+0800 and GMT+0900 in Asia/Chita #368

Open
dmitryshimkin opened this issue Jul 29, 2016 · 1 comment
Labels

Comments

@dmitryshimkin
Copy link

dmitryshimkin commented Jul 29, 2016

First thank you guys for the great job you're doing.

I am using moment.timezone v0.5.5 with 2016f tzdata.

The test case is:

var m1 = moment.tz([2016, 2, 27, 1, 59, 59, 0], 'Asia/Chita')
var m2 = moment.tz([2016, 2, 27, 2, 0, 0, 0], 'Asia/Chita')
var m3 = moment.tz([2016, 2, 27, 3, 0, 0, 0], 'Asia/Chita')

console.log('A.', m1.valueOf(), m1.toString())
console.log('B.', m2.valueOf(), m2.toString())
console.log('C.', m3.valueOf(), m3.toString())

In Chrome 51 on Mac OS 10.11.4 I get the following result:

A. 1459015199000 Sun Mar 27 2016 01:59:59 GMT+0800
B. 1459015200000 Sun Mar 27 2016 03:00:00 GMT+0900
C. 1459018800000 Sun Mar 27 2016 04:00:00 GMT+0900

Since Asia/Chita moved from GMT+0800 to GMT+0900 the input arrays in both B. and C. must produce exactly the same result - Sun Mar 27 2016 03:00:00 GMT+0900 and timestamp 1459015200000.

However the date and timestamp in C. are different and wrong - 04:00:00 and 1459018800000

@dmitryshimkin dmitryshimkin changed the title Wrong timestamp for dates in transition moment between GMT+0800 and GMT+0900 in Asia/Chita Wrong timestamp for dates in transition period between GMT+0800 and GMT+0900 in Asia/Chita Jul 29, 2016
@mattjohnsonpint
Copy link
Contributor

Thanks for the bug report. I can confirm this, and will dig in further as soon as I can.

@mattjohnsonpint mattjohnsonpint self-assigned this Aug 18, 2016
@mattjohnsonpint mattjohnsonpint removed their assignment Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants