-
Notifications
You must be signed in to change notification settings - Fork 837
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
defaulting to current date-time uses UTC (ignores timezone) #874
Comments
I'm pretty sure I'm seeing some behaviour related to this.
If I however advance my clock to a point where Sydney and UTC are both in the same day(27th), I get stamps for the 27th as I would expect. |
Yep, I can reproduce this issue on latest moment + moment-timezone. Some mechanism to request "current local time" from moment to moment-timezone might be required. |
can you assign this project to me |
Moment created from formatting time sets the date as the UTC date rather than the date of the default timezone
EX:
m = require('moment-timezone')
_ = m.tz.setDefault("Asia/Kolkata")
console.log(m())
console.log(m("T22:00","THH:mm"))
Output:
moment.parseZone("2020-07-20T03:33:18.943+05:30")
moment.parseZone("2020-07-19T22:00:00.000+05:30")
The text was updated successfully, but these errors were encountered: