(offset: number): TimeZone.OffsetCreate a fixed offset time zone.
Details
The offset is specified in milliseconds from UTC. Positive values are ahead of UTC, negative values are behind UTC.
Example (Creating fixed-offset time zones)
import { DateTime } from "effect"
// Create a time zone with +3 hours offset
const zone = DateTime.zoneMakeOffset(3 * 60 * 60 * 1000)
const dt = DateTime.makeZonedUnsafe("2024-01-01T12:00:00Z", {
timeZone: zone
})time zones
Source effect/DateTime.ts:10411 lines
export const const zoneMakeOffset: (
offset: number
) => TimeZone.Offset
Create a fixed offset time zone.
Details
The offset is specified in milliseconds from UTC. Positive values are
ahead of UTC, negative values are behind UTC.
Example (Creating fixed-offset time zones)
import { DateTime } from "effect"
// Create a time zone with +3 hours offset
const zone = DateTime.zoneMakeOffset(3 * 60 * 60 * 1000)
const dt = DateTime.makeZonedUnsafe("2024-01-01T12:00:00Z", {
timeZone: zone
})
zoneMakeOffset: (offset: numberoffset: number) => TimeZone.interface TimeZone.OffsetFixed-offset time zone.
Details
The offset is measured in milliseconds from UTC. Positive offsets are
ahead of UTC, and negative offsets are behind UTC.
Offset = import InternalInternal.const zoneMakeOffset: (
offset: number
) => TimeZone.Offset
zoneMakeOffsetReferenced by 4 symbols