Timedesc.TimestampTimestamp specific functions
type t = timestampval min_val : tval max_val : tval now : unit -> tval to_s_ns : t -> int64 * intval to_float_s : t -> floatReturns span in seconds, fraction represents subsecond span.
Representation is the same as result from Unix.gettimeofday.
val of_float_s : float -> tConvert from span in seconds, fraction represents subsecond span
Representation is the same as result from Unix.gettimeofday.
val get_s : t -> int64val get_ns_offset : t -> intval pp :
?display_using_tz:Time_zone.t ->
?format:string ->
unit ->
Stdlib.Format.formatter ->
t ->
unitPretty-printing for timestamp.
Follows same format string rules and default format string as pp.
val to_string :
?display_using_tz:Time_zone.t ->
?format:string ->
timestamp ->
stringval pp_rfc3339 : ?frac_s:int -> unit -> Stdlib.Format.formatter -> t -> unitPretty-prints according to RFC3339, e.g. 2020-01-20T13:00:00.0001+10.
frac_s determines the number of fractional digits to include.
val pp_rfc3339_milli : Stdlib.Format.formatter -> t -> unitval pp_rfc3339_micro : Stdlib.Format.formatter -> t -> unitval pp_rfc3339_nano : Stdlib.Format.formatter -> t -> unitval to_rfc3339 : ?frac_s:int -> t -> stringval to_rfc3339_milli : t -> stringval to_rfc3339_micro : t -> stringval to_rfc3339_nano : t -> stringval pp_iso8601 : ?frac_s:int -> unit -> Stdlib.Format.formatter -> t -> unitAlias to pp_rfc3339
val pp_iso8601_milli : Stdlib.Format.formatter -> t -> unitval pp_iso8601_micro : Stdlib.Format.formatter -> t -> unitval pp_iso8601_nano : Stdlib.Format.formatter -> t -> unitval to_iso8601 : ?frac_s:int -> t -> stringAlias to to_rfc3339
val to_iso8601_milli : t -> stringval to_iso8601_micro : t -> stringval to_iso8601_nano : t -> stringval pp_rfc9110 : Stdlib.Format.formatter -> t -> unitWarning: Subsecond value is truncated
val to_rfc9110 : t -> stringWarning: Subsecond value is truncated
val pp_http : Stdlib.Format.formatter -> t -> unitAlias to pp_rfc9110
val to_http : t -> stringAlias to to_rfc9110
val of_iso8601 : string -> (t, string) Stdlib.resultParses a subset of ISO8601, up to 9 fractional digits for second (nanosecond precision).
If more than 9 fractional digits are provided, then only the first 9 digits are used, i.e. no rounding.
val of_iso8601_exn : string -> tval of_rfc9110 : string -> (t, string) Stdlib.resultSee of_rfc9110
val of_rfc9110_exn : string -> tval of_http : string -> (t, string) Stdlib.resultAlias to of_rfc9110
val of_http_exn : string -> tAlias to of_rfc9110_exn