Legend:
Library
Module
Module type
Parameter
Class
Class type
Conversions between Standard Time, UTC and TAI.
Overview
This module contains a type for representing values of standard time, defined as a reference from Coordinated Universal Time (UTC). It also provides functions for converting values of standard time to and from TAI64 values (see Cf_tai64).
Note: no facility is yet provided here for manipulating time with associated timezone attributes. Converting arbitrary values of UTC time to and from local time is tricky, since daylight savings time rules vary greatly from locality to locality, and some are even subject to change without advance notice.
The class type inhabited by object types representing unqualified local time stamps, which comprise a Gregorian calendar date and a civil time synchronized with Coordinated Universal Time (UTC) without localizing time zone offset.
Use localize t to convert the UTC time stamp t to a local time stamp. If ~offset is used, then the civil time and calendar date are adjusted accordingly. Raises Invalid_argument if the adjustment to the calendar date would overflow the 64-bit integer representation of the astronomical year.
Use local_to_utc to convert t to the UTC. Raises Invalid_argument in the untypical case that time zone adjustment results in an overflow in the 64-bit integer arithetic for the Gregorian calendar year.