package timedesc

  1. Overview
  2. Docs
type t

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

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

tz is the time zone tied. If only an offset is provided during construction, then a fixed offset time zone is constructed, e.g. if say only an offset of 10 hours is provided, tz becomes "UTC+10".

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 make_exn : ?tz:Time_zone.t -> ?offset_from_utc:Span.t -> unit -> t
val tz : t -> Time_zone.t
val offset_from_utc : t -> Span.t option
val equal : t -> t -> bool
OCaml

Innovation. Community. Security.