getUTCOffset
Returns the system's current UTC offset formatted as ±HH:mm.
getUTCOffset()
Returns the system's current UTC offset formatted as ±HH:mm (+06:00 or -07:00).
Signature
getUTCOffset(): $UTCOffsetReturn Type
$UTCOffset — Offset string in the format ±HH:mm (e.g., +05:30, -06:00)
Description
Returns the system’s current UTC offset in string format.
Note
Unlike JavaScript's Date.prototype.getTimezoneOffset() which returns the offset in minutes behind UTC (positive for locations west of UTC), this method returns a human-readable offset using time zone sign conventions (e.g., +06:00 means 6 hours ahead of UTC).
Example
playground.ts
Last updated: Thu, May 21, 2026 03:14:59PM (UTC)
