Browse thread
.-
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | skaller <skaller@u...> |
| Subject: | Re: [Caml-list] .- |
On Fri, 2004-12-24 at 21:04, Anastasia Gornostaeva wrote:
> Hello.
>
> open Unix
>
> let _ =
> let curr_time = time () in
> let curr_tm = gmtime curr_time in
> let new_time, _ = mktime {curr_tm with tm_hour = curr_tm.tm_hour+1} in
> let diff = new_time -. curr_time in
> Printf.printf "%f\n%f\n%f\n"
> curr_time
> new_time
> diff
>
>
> gives an negative result -7200.000000. Why?
Because you live in Russia not London.
gmtime is adjusting for your timezone. Instead of 1 hour,
you're getting -2 hours. So I am going to guess you live
in a GMT+3 hour timezone .. so that's Western Russia,
perhaps Moscow?
--
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850,
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net