I use the library moment-timezone v.0.5.3-2016cto calculate the UTC offset for the time zone:
var z = moment().tz("America/Los_Angeles");
z.utcOffset(); // -420 mins or -7 hours
// check if DST is shifted
z.isDSTShifted(); // false
But here https://en.wikipedia.org/wiki/List_of_tz_database_time_zones UTC offset for America/Los_Angelesis -8 hours.
Moment uses tzdb v.2016c and a wikipedia article.
Well, why are there two different results? And what is the correct result?
PS: there is the same difference for America/Kentucky/Monticelloand Europe/Tiraspol.
source
share