package octez-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=c6df840ebbf115e454db949028c595bec558a59a66cade73b52a6d099d6fa4d4
sha512=d8aee903b9fe130d73176bc8ec38b78c9ff65317da3cb4f3415f09af0c625b4384e7498201fdb61aa39086a7d5d409d0ab3423f9bc3ab989a680cf444a79bc13
doc/octez-libs.base/Tezos_base/Time/System/index.html
Module Time.System
Source
System time
A representation of timestamps.
NOTE: This representation is limited to times between 0000-01-01 00:00:00 UTC and 9999-12-31 23:59:59.999999999999 UTC
NOTE: This is based on the system clock. As a result, it is affected by system clock adjustments. IF you need monotonous time, you can use Mtime
.
Conversions to and from Protocol time
Note that converting system time to protocol time truncates any subsecond precision.
Convert a Protocol time into a System time.
Return None
if the Protocol time is outside the RFC3339 range.
Convert a Protocol time into a System time.
Raises Invalid_argument
if the Protocol time is outside the RFC3339 range.
Convert a System time into a Protocol time.
Note that subseconds are truncated.
Conversions to and from string (using RFC3339)
Convert a string in the RFC3339 format (e.g., "1970-01-01T00:00:00.000-00:00"
) into a system time. Invalid RFC3339 notations will return None
.
Note that years outside the 0000-9999 range are invalid RFC3339-wise.
Convert a string in the RFC3339 format (e.g., "1970-01-01T00:00:00.000-00:00"
) into a system time. Invalid RFC3339 notations will raise Invalid_argument
.
Note that years outside the 0000-9999 range are invalid RFC3339-wise.
Convert a system time into an RFC3339 notation (e.g., "1970-01-01T00:00:00.000-00:00"
).
Serialization
Pretty-printing
Timestamping data
recent a b
is either a
or b
(which ever carries the most recent timestamp), or None
if both a
and b
are None
.