Why does JavaScript Date.getTimezoneOffset() consider “-05:00” as a positive offset?

Because that’s how it’s defined. Quoting the doc (MDN):

The time-zone offset is the difference, in minutes, between UTC and
local time. Note that this means that the offset is positive if the
local timezone is behind UTC and negative if it is ahead
.

Leave a Comment