package timere

  1. Overview
  2. Docs

Module Timere.Time_zoneSource

Sourcetype t
Sourceval make : string -> t option

Makes a time zone from name.

Naming follows the convention used in /usr/share/zoneinfo/posix/ distributed on Linux, e.g. "Australia/Sydney".

See available_time_zones or checking usable time zone names at runtime.

Alternatively, if you are using timere.tz.full (the default implementation for timere.tz.data), then you can also see available-time-zones.txt for available time zones.

Sourceval make_exn : string -> t
Sourceval name : t -> string
Sourceval utc : t
Sourceval equal : t -> t -> bool
Sourceval available_time_zones : string list
Sourceval make_offset_only : ?name:string -> int -> t

This is mainly used for when you only have an offset to work with, and you don't need to do any accurate search over time zones.

One use of this is to create a time zone for to_string functions.

Importing and exporting

type entry = {
  1. is_dst : bool;
  2. offset : int;
}
Sourcemodule Raw : sig ... end
Sourcemodule Sexp : sig ... end
Sourcemodule JSON : sig ... end
Sourcemodule Db : sig ... end
OCaml

Innovation. Community. Security.