package timedesc

  1. Overview
  2. Docs

Time zone information that can be attached to date time like data

type t

Time zone information of date time.

type error = [
  1. | `Missing_both_tz_and_fixed_offset_from_utc
  2. | `Invalid_offset of Span.t
  3. | `Unrecorded_offset of Span.t
]
val make : ?tz:Time_zone.t -> ?fixed_offset_from_utc:Span.t -> unit -> (t, error) Stdlib.result

* tz is the time zone tied. If only an offset provided during construction, then one a fixed offset one is constructed, e.g. * if say only offset of 10 hours is provided, tz becomes "UTC+10". * * fixed_offset_from_utc is the fixed offset from UTC. * If an offset is not provided but the time zone can be represented by a fixed offset, then said offset is used, * e.g. "UTC+1" can be represented by fixed offset of 1 hour. *

val tz : t -> Time_zone.t
val fixed_offset_from_utc : t -> Span.t option
val equal : t -> t -> bool
val of_sexp : CCSexp.t -> (t, string) Stdlib.result
val to_sexp : t -> CCSexp.t
OCaml

Innovation. Community. Security.