Skip to content

convertZonedToUtc

  • The core functions, which every industry uses.
convertZonedToUtc(value: string): string

Convert an ISO 8601 zoned datetime string to a UTC Instant string (ISO).

  • Uses Temporal.ZonedDateTime.toInstant to convert.
  • Returns "" for invalid input.
ParameterTypeDescription
valuestringzoned ISO 8601 datetime string

UTC Instant ISO string or "" when invalid

import { convertZonedToUtc } from "@northguild/gmt/zoned/convert";
convertZonedToUtc("2024-02-29T12:34:56.789+00:00[UTC]") // "2024-02-29T12:34:56.789Z"
output 

zoned/convert/convertZonedToUtc.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.