Package: effect
Module: DateTime
Formats the time zone offset of a DateTime.Zoned as an ISO string.
Details
The offset is formatted as “±HH:MM”.
Example (Formatting zoned offsets)
import { DateTime } from "effect"
const zoned = DateTime.makeZonedUnsafe("2024-01-01T12:00:00Z", {
timeZone: DateTime.zoneMakeOffset(3 * 60 * 60 * 1000) // +3 hours
})
const offsetString = DateTime.zonedOffsetIso(zoned)
console.log(offsetString) // "+03:00"
Signature
declare const zonedOffsetIso: (self: Zoned) => string
Since v3.6.0