Package: effect
Module: DateTime
Create a Layer from the system’s local time zone.
Details
This layer provides the CurrentTimeZone service using the system’s
configured local time zone.
Example (Providing local time zone layers)
import { DateTime, Effect } from "effect"
const program = Effect.gen(function*() {
const now = yield* DateTime.nowInCurrentZone
return DateTime.formatIsoZoned(now)
})
// Use the system's local time zone
Effect.provide(program, DateTime.layerCurrentZoneLocal)
Signature
declare const layerCurrentZoneLocal: Layer.Layer<CurrentTimeZone, never, never>
Since v3.6.0