getters

Date.prototype.getTimezoneOffset

Returns the difference between UTC and the host's local time in MINUTES with the SIGN REVERSED from the conventional offset. So India (UTC+05:30) returns -330 and New York in EST (UTC-05:00) returns 300.

date.getTimezoneOffset()

Parameters

Parameter Purpose
() no arguments; returns Number (minutes)
sign negative for zones ahead of UTC, positive for zones behind
DST varies by date within a zone (summer vs winter)

Examples

// In India (UTC+05:30)
console.log(new Date().getTimezoneOffset()); // -330

sign is reversed

// In New York EST (UTC-05:00)
console.log(new Date('2026-01-15').getTimezoneOffset()); // 300

west of UTC = positive

const off = new Date().getTimezoneOffset(); console.log(`${-off/60} hours from UTC`);

convert to hours with correct sign

Gotcha

The sign is INVERSE to what most humans call the offset (UTC+05:30 -> -330). Multiply by -1 to get a normal offset in minutes.

Related

← All JS Date methods · Math methods · Cron syntax