You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm pretty sure I'm seeing some behaviour related to this.
It's currently 2020-07-27 in Sydney, however UTC is still the 26th. Any value I have tried from 00:00 to 23:59 gives a date on the 26th.
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.
ichernev
changed the title
moment from formatted time has UTC date instead of the default timezone
defaulting to current date-time uses UTC (ignores timezone)
Aug 26, 2022
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: