Package: effect
Module: DateTime
Sets the time zone of a DateTime, returning a new DateTime.Zoned.
Example (Setting time zones)
import { DateTime, Effect } from "effect"
Effect.gen(function*() {
const now = yield* DateTime.now
const zone = DateTime.zoneMakeNamedUnsafe("Europe/London")
// set the time zone
const zoned: DateTime.Zoned = DateTime.setZone(now, zone)
})
Signature
declare const setZone: { (zone: TimeZone, options?: { readonly adjustForTimeZone?: boolean | undefined; readonly disambiguation?: Disambiguation | undefined; }): (self: DateTime) => Zoned; (self: DateTime, zone: TimeZone, options?: { readonly adjustForTimeZone?: boolean | undefined; readonly disambiguation?: Disambiguation | undefined; }): Zoned; }
Since v3.6.0