The Timestamp structure provides a mechanism for generating timestamps that
respect the SOURCE_DATE_EPOCH
environment variable.
Synopsis
structure Timestamp
Interface
exception InvalidSourceDateEpoch of string
val makeTimestamp : Time.time -> Time.time
val now : unit -> Time.time
Description
exception InvalidSourceDateEpoch of string-
The exception that is raised when the
SOURCE_DATE_EPOCHenvironment variable is defined, but malformed. val makeTimestamp : Time.time -> Time.time-
makeTimestamp treturns a timestamp that is eithert, when the environment variableSOURCE_DATA_EPOCHis not defined, and is the value ofSOURCE_DATA_EPOCHinterpreted as the number of seconds (excluding leap seconds) since January 1, 1970 00:00:00 UTC otherwise. IfSOURCE_DATE_EPOCHis defined, but malformed, then the exceptionInvalidSourceDateEpoch sis raised, wheresis the value of theSOURCE_DATE_EPOCHenvironment variable. val now : unit -> Time.time-
now ()is equivalent to the expressionmakeTimestamp (Time.now ()).