Function: tzOffsetMinutes()
tzOffsetMinutes(
instant,timeZone):number
Defined in: src/lib/dates/tz.ts:82
Offset (minutes) of timeZone from UTC at instant. East of UTC is positive.
DST-aware: the offset is computed for the specific instant, so e.g. America/New_York
returns -240 (EDT) in summer and -300 (EST) in winter. Sign convention is
localWallTime − UTC, i.e. zones east of UTC are positive, west are negative.
Parameters
instant
Date
The absolute point in time (a UTC-based Date) at which to measure the offset.
timeZone
string
IANA timezone identifier (e.g. America/New_York); invalid ids throw RangeError.
Returns
number
The signed offset in whole minutes (e.g. -300 for EST, 60 for CET).
Throws
RangeError If timeZone is not a valid IANA timezone identifier.
Throws
RangeError If instant is an invalid Date.