effect-io-ai

Package: effect
Module: DateTime

DateTime.withCurrentZoneLocal

Provide the CurrentTimeZone to an effect, using the system’s local time zone.

Example

import { DateTime, Effect } from "effect"

Effect.gen(function* () {
  // will use the system's local time zone
  const now = yield* DateTime.nowInCurrentZone
}).pipe(DateTime.withCurrentZoneLocal)

Signature

declare const withCurrentZoneLocal: <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, CurrentTimeZone>>

Source

Since v3.6.0