summaryrefslogtreecommitdiff
path: root/otherlibs/unix
diff options
context:
space:
mode:
authorGabriel Scherer <gabriel.scherer@gmail.com>2017-02-22 20:24:15 -0500
committerGitHub <noreply@github.com>2017-02-22 20:24:15 -0500
commit12bc55e6ebe182f20698a73af88b19f99a1e4781 (patch)
treefb8300ff7857f2775f313fa2d6cef3539a1f0999 /otherlibs/unix
parent1de02c574f4717e0c5d0c519b8bb7706061c208f (diff)
parentaf092cccff1d100eb43e76b62eae97e8ccfde5a1 (diff)
downloadocaml-12bc55e6ebe182f20698a73af88b19f99a1e4781.tar.gz
Merge pull request #1051 from Chris00/timegm
Document how to perform the inverse of (gm|local)time
Diffstat (limited to 'otherlibs/unix')
-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