module Time_Zone:Time zone management.sig
..end
You can change
the current
time zone in your program by side effect.
type
t =
| |
UTC |
(* | Greenwich Meridian Time | *) |
| |
Local |
(* | Local Time | *) |
| |
UTC_Plus of |
(* | Another time zone specified from UTC | *) |
val current : unit -> t
UTC
before any change.val change : t -> unit
Invalid_argument
if the specified time zone is UTC_Plus x
with
x < -12 or x > 11val gap : t -> t -> int
gap UTC (UTC_Plus 5)
returns 5 and, at Paris in summer,
gap Local UTC
returns -2.val from_gmt : unit -> int
from_gmt ()
is equivalent to gap UTC (current ())
.val to_gmt : unit -> int
to_gmt ()
is equivalent to gap (current ()) UTC
.