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
There seems to be a bug in getUnixTime. The unix timestamp is incorrectly generated just after the change to PDT.
I've validated the result and compared the behavior to moment-timezone. See test case below
constmoment=require('moment-timezone');const{ findTimeZone, getUnixTime }=require('timezone-support');constunix1=getUnixTime({year: 2018,month: 3,day: 11,hours: 5},findTimeZone('America/Vancouver'))/1000;console.log(unix1);// => 1520773200// => 1520773200 converts to Sunday March 11, 2018 06:00:00 (am) in time zone America/Vancouver (PDT)// Reference: https://www.epochconverter.com/timezones?q=1520773200&tz=America%2FVancouverconstunix2=moment.tz('2018-03-11T05:00:00','America/Vancouver').unix();console.log(unix2);// => 1520769600// => 1520769600 converts to Sunday March 11, 2018 05:00:00 (am) in time zone America/Vancouver (PDT)// Reference: https://www.epochconverter.com/timezones?q=1520769600&tz=America%2FVancouver
Would be great if this could be fixed. It has caused me some headaches as I'm trying to improve performance by migrating from moment-timezone to timezone-support.
Thank you very much for your consideration!
The text was updated successfully, but these errors were encountered:
There seems to be a bug in
getUnixTime
. The unix timestamp is incorrectly generated just after the change to PDT.I've validated the result and compared the behavior to moment-timezone. See test case below
Would be great if this could be fixed. It has caused me some headaches as I'm trying to improve performance by migrating from
moment-timezone
totimezone-support
.Thank you very much for your consideration!
The text was updated successfully, but these errors were encountered: