diff options
author | Gabriel Scherer <gabriel.scherer@gmail.com> | 2017-02-22 20:24:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-22 20:24:15 -0500 |
commit | 12bc55e6ebe182f20698a73af88b19f99a1e4781 (patch) | |
tree | fb8300ff7857f2775f313fa2d6cef3539a1f0999 | |
parent | 1de02c574f4717e0c5d0c519b8bb7706061c208f (diff) | |
parent | af092cccff1d100eb43e76b62eae97e8ccfde5a1 (diff) | |
download | ocaml-12bc55e6ebe182f20698a73af88b19f99a1e4781.tar.gz |
Merge pull request #1051 from Chris00/timegm
Document how to perform the inverse of (gm|local)time
-rw-r--r-- | otherlibs/unix/unix.mli | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/otherlibs/unix/unix.mli b/otherlibs/unix/unix.mli index cd25e2cb1c..7c490688b8 100644 --- a/otherlibs/unix/unix.mli +++ b/otherlibs/unix/unix.mli @@ -974,11 +974,14 @@ val gettimeofday : unit -> float 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. *) + a time. Assumes UTC (Coordinated Universal Time), also known as GMT. + To perform the inverse conversion, set the TZ environment variable + to "UTC", use {!mktime}, and then restore the original value of TZ. *) 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. *) + a time. Assumes the local time zone. + The function performing the inverse conversion is {!mktime}. *) val mktime : tm -> float * tm (** Convert a date and time, specified by the [tm] argument, into |