Version française
Home     About     Download     Resources     Contact us    
Browse thread
.-
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Anastasia Gornostaeva <ermine@e...>
Subject: .-
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?