Module Time.Zone

module Zone: Zone

exception Unknown_zone of string
exception Invalid_file_format of string
type t 
include Stringable
val find : string -> t option
find name looks up a t by its name and returns it.
val find_office : [ `chi | `hkg | `ldn | `nyc ] -> t
find_office office a more type-safe interface for pulling timezones related to existing Jane Street offices/locations.
val find_exn : string -> t
val machine_zone : ?refresh:bool -> unit -> t
machine_zone ?refresh () returns the machines zone (t). It does this by first looking for a value in the environment variable "TZ", and loading the named zone if it is set. If "TZ" is not set it reads /etc/localtime directly.

The first call to machine_zone is cached, so there is no need to cache it locally. The cache can be bypassed and refreshed by setting ~refresh to true.

val of_utc_offset : int -> t
of_utc_offset offset returns a timezone with a static UTC offset (given in hours).
val utc : t
utc the UTC time zone. Included for convenience
val abbreviation : t -> float -> string
abbreviation zone t returns t abbreviation name such as EDT, EST, JST of given zone at the time t. This string conversion is one-way only, and cannot reliably be turned back into a t
val name : t -> string
name zone returns the name of the time zone
val init : unit -> unit
init () pre-load all available time zones from disk, this function has no effect if it is called multiple times. Time zones will otherwise be loaded at need from the disk on the first call to find/find_exn.
val digest : t -> string option
digest t return the MD5 digest of the file the t was created from (if any)
val to_utc_offset : t -> int
to_utc_offset returns the UTC offset of timezone t, in seconds
val initialized_zones : unit -> (string * t) list
initialized_zones () returns a sorted list of time zone names that have been loaded from disk thus far.
val shift_epoch_time : t -> [ `Local | `UTC ] -> float -> float
val pp : Format.formatter -> t -> unit
module Stable: sig .. end
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_t : t Bin_prot.Type_class.t
val bin_read_t : t Bin_prot.Read_ml.reader
val bin_read_t_ : t Bin_prot.Unsafe_read_c.reader
val bin_read_t__ : (int -> t) Bin_prot.Unsafe_read_c.reader
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write_ml.writer
val bin_write_t_ : t Bin_prot.Unsafe_write_c.writer
val bin_writer_t : t Bin_prot.Type_class.writer