Skip to content

hasDaylightSaving

  • The core functions, which every industry uses.
hasDaylightSaving(timeZone: string, options?: { at?: string; }): boolean

Check whether a timeZone observes daylight saving time at a reference instant.

  • True when the zone is in daylight time at the reference instant, or a daylight period begins less than 365 days after it. So a zone in its winter is true, and a zone that has stopped changing its clocks is false.
  • With options.at the answer does not depend on the day the code runs.
  • The rule is GMT’s own definition, not the tz database’s daylight flag, which no JavaScript API exposes: daylight time runs from a forward change of the zone’s clocks to the backward change of the same size that undoes it, less than 365 days later.
  • Read as standard time, because the offsets do not show otherwise: the last summer before a zone kept its daylight offset for good; a daylight period held 365 days or longer; one that began, ended or was interrupted by a move of standard time, so the offset changes part-way through and the rest, or all, of it is not paired (Asia/Tomsk 2002); and one whose end is past the last instant Temporal can represent.
  • A forward change never undone is a change of standard time: Europe/Istanbul is false from 2016 on, although its clocks went forward in March 2016.
  • Read from the runtime’s time zone data, so the answer can change when that data does.
  • Returns false for an invalid timeZone, an invalid at, an options argument that is not an object, and a fixed UTC offset, with or without seconds ("+05:30", "-00:44:30").
ParameterTypeDescription
timeZonestringIANA name or UTC offset: a time zone identifier (+05:30, +0530, -08) or a stored offset (±HH:MM[:SS], what getTimeZoneOffset returns)

options

optional setting for the reference instant

OptionTypeDefaultDescription
at?stringThe current instant.The reference instant the zone is judged at, as an ISO 8601 instant string ending in Z or an offset, as isValidInstant reads it. A bracketed zone or any other annotation makes it invalid. An invalid value returns false.

boolean indicating whether the timeZone observes DST, or false on invalid input

import { hasDaylightSaving } from "@northguild/gmt/zoned/validate";
hasDaylightSaving("Europe/London", { at: "2024-01-15T12:00:00Z" }) // true
output 

zoned/validate/hasDaylightSaving.ts

Accessibility
© 2026 NorthGuild · Licences

Code examples: MIT-0. Packages: MIT. Third-party data and components: their own licences, credited where they appear. Everything else: © 2026 NorthGuild, all rights reserved.