exiftool-vendored
    Preparing search index...

    Function isZoneValid

    • Type guard to check if a Zone is valid and usable.

      A zone is considered valid if it:

      • Is not null/undefined
      • Has isValid === true (Luxon requirement)
      • Is not the library's UnsetZone sentinel
      • Has an offset within ±14 hours (the valid range for real-world timezones)

      This is the canonical validation check used throughout the library.

      Parameters

      • zone: Maybe<Zone<boolean>>

        Zone to validate

      Returns zone is Zone<true>

      true if the zone is valid and usable (type guard)

      const zone = Info.normalizeZone("America/Los_Angeles")
      if (isZoneValid(zone)) {
      // TypeScript knows zone is Zone (not Zone | undefined)
      console.log(zone.name)
      }

      isZoneValid(Info.normalizeZone("invalid")) // false
      isZoneValid(Info.normalizeZone("UTC+8")) // true
      isZoneValid(UnsetZone) // false
      isZoneValid(Info.normalizeZone("UTC+20")) // false (beyond ±14 hours)