summaryrefslogtreecommitdiff
path: root/otherlibs
diff options
context:
space:
mode:
authorChristophe Troestler <Christophe.Troestler@umons.ac.be>2017-02-17 22:17:16 +0100
committerGabriel Scherer <gabriel.scherer@gmail.com>2017-02-22 20:26:49 -0500
commit2923dfbc191365a892f97c8ffe162472816ac601 (patch)
treece6f12e1c20c86a87948a77ee6532e0c56e2de06 /otherlibs
parentd79d9986ee98bba19f382d7b4c780c88a0a44d8d (diff)
downloadocaml-2923dfbc191365a892f97c8ffe162472816ac601.tar.gz
Document how to perform the inverse of (gm|local)time
The goal is to make the documentation slightly more self contained on the links between the time functions.
Diffstat (limited to 'otherlibs')
-rw-r--r--otherlibs/unix/unix.mli7
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