1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| val time : unit -> float
Return the current time since 00:00:00 GMT, Jan. 1, 1970, in seconds.
val gettimeofday : unit -> float
Same as Unix.time, but with resolution better than 1 second.
val gmtime : float -> tm
Convert a time in seconds, as returned by Unix.time, into a date and a time. Assumes UTC (Coordinated Universal Time), also known as GMT.
val localtime : float -> tm
Convert a time in seconds, as returned by Unix.time, into a date and a time. Assumes the local time zone.
val mktime : tm -> float * tm
Convert a date and time, specified by the tm argument, into a time in seconds, as returned by Unix.time. The tm_isdst, tm_wday and tm_yday fields of tm are ignored. Also return a normalized copy of the given tm record, with the tm_wday, tm_yday, and tm_isdst fields recomputed from the other fields, and the other fields normalized (so that, e.g., 40 October is changed into 9 November). The tm argument is interpreted in the local time zone. |
Partager