Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: skaller <skaller@users.sourceforge.net>
To: Anastasia Gornostaeva <ermine@ermine.pp.ru>
Cc: Caml-list@yquem.inria.fr
Subject: Re: [Caml-list] .-
Date: 24 Dec 2004 22:19:12 +1100	[thread overview]
Message-ID: <1103887152.6201.80.camel@pelican.wigram> (raw)
In-Reply-To: <20041224100422.GA10012@ermine.home>

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




  parent reply	other threads:[~2004-12-24 11:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-24 10:04 .- Anastasia Gornostaeva
2004-12-24 10:53 ` [Caml-list] .- Benjamin Geer
2004-12-24 11:25   ` skaller
2004-12-24 11:34     ` Benjamin Geer
2004-12-24 11:07 ` Alexander Fuchs
2004-12-24 11:27   ` Anastasia Gornostaeva
2004-12-24 11:14 ` Julien Cristau
2004-12-24 11:19 ` skaller [this message]
2004-12-24 12:14   ` Anastasia Gornostaeva

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1103887152.6201.80.camel@pelican.wigram \
    --to=skaller@users.sourceforge.net \
    --cc=Caml-list@yquem.inria.fr \
    --cc=ermine@ermine.pp.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox