Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file zone_intf.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136(** Time-zone handling. *)open!Import(** The internal time representation of [Zone.t]. This is a tiny subset of [Time0_intf.S],
see that interface for details such as the meaning of [Span] and [Date_and_ofday].
The name of the interface reflects the fact that the interface only gives you access
to the seconds of the [t]. But you can use this interface with types that have higher
precision than that, hence the rounding implied in the name of
[to_int63_seconds_round_down_exn].
*)moduletypeTime_in_seconds=sigmoduleSpan:sigtypetvalof_int63_seconds:Int63.t->tvalto_int63_seconds_round_down_exn:t->Int63.tendmoduleDate_and_ofday:sigtypetvalof_synthetic_span_since_epoch:Span.t->tvalto_synthetic_span_since_epoch:t->Span.tendtypetvalof_span_since_epoch:Span.t->tvalto_span_since_epoch:t->Span.tend(** This is the interface of [Zone], but not the interface of [Time.Zone] or
[Time_ns.Zone]. For those, look at [Time_intf.Zone] *)moduletypeS=sig(** {1 User-friendly interface} *)(** The type of a time-zone.
bin_io and sexp representations of Zone.t are the name of the zone, and
not the full data that is read from disk when Zone.find is called. The
full Zone.t is reconstructed on the receiving/reading side by reloading
the zone file from disk. Any zone name that is accepted by [find] is
acceptable in the bin_io and sexp representations. *)typet[@@derivingsexp_of,compare](** [input_tz_file ~zonename ~filename] read in [filename] and return [t]
with [name t] = [zonename] *)valinput_tz_file:zonename:string->filename:string->t(** [likely_machine_zones] is a list of zone names that will be searched
first when trying to determine the machine zone of a box. Setting this
to a likely set of zones for your application will speed the very first
use of the local timezone. *)vallikely_machine_zones:stringlistref(** [of_utc_offset offset] returns a timezone with a static UTC offset (given in
hours). *)valof_utc_offset:hours:int->tvalof_utc_offset_explicit_name:name:string->hours:int->t(** [utc] the UTC time zone. Included for convenience *)valutc:tvalname:t->string(** [original_filename t] return the filename [t] was loaded from (if any) *)valoriginal_filename:t->stringoption(** [digest t] return the MD5 digest of the file the t was created from (if any) *)valdigest:t->Md5.toptionmoduleTime_in_seconds:Time_in_seconds(** For performance testing only; [reset_transition_cache t] resets an internal cache in
[t] used to speed up repeated lookups of the same clock shift transition. *)valreset_transition_cache:t->unit(** A time zone index refers to a range of times delimited by DST transitions at one or
both ends. Every time belongs to exactly one such range. The times of DST
transitions themselves belong to the range for which they are the lower bound. *)moduleIndex:sigtypet[@@immediate]valnext:t->tvalprev:t->tend(** Gets the index of a time. *)valindex:t->Time_in_seconds.t->Index.tvalindex_of_date_and_ofday:t->Time_in_seconds.Date_and_ofday.t->Index.t(** Gets the UTC offset of times in a specific range.
This can raise if you use an [Index.t] that is out of bounds for this [t]. *)valindex_offset_from_utc_exn:t->Index.t->Time_in_seconds.Span.t(** [index_abbreviation_exn t index] returns the abbreviation name (such as EDT, EST,
JST) of given zone [t] for the range of [index]. This string conversion is one-way
only, and cannot reliably be turned back into a [t]. This function reads and writes
the zone's cached index. Raises if [index] is out of bounds for [t]. *)valindex_abbreviation_exn:t->Index.t->string(** Accessors for the DST transitions delimiting the start and end of a range, if any.
The [_exn] accessors raise if there is no such transition. These accessors are split
up to increase performance and improve allocation; they are intended as a low-level
back-end for commonly-used time conversion functions. See [Time.Zone] and
[Time_ns.Zone] for higher-level accessors that return an optional tuple for clock
shifts in either direction. *)valindex_has_prev_clock_shift:t->Index.t->boolvalindex_prev_clock_shift_time_exn:t->Index.t->Time_in_seconds.tvalindex_prev_clock_shift_amount_exn:t->Index.t->Time_in_seconds.Span.tvalindex_has_next_clock_shift:t->Index.t->boolvalindex_next_clock_shift_time_exn:t->Index.t->Time_in_seconds.tvalindex_next_clock_shift_amount_exn:t->Index.t->Time_in_seconds.Span.tendmoduletypeS_stable=sigtypetmoduleFull_data:sigmoduleV1:Stable_module_types.S0_without_comparatorwithtypet=tendendmoduletypeZone=sigmoduletypeS=SmoduletypeS_stable=S_stableincludeSmoduleStable:S_stablewithtypet:=tend