Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] date - waiting for 64-bit (was: Gripes with array)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: james woodyatt <jhw@w...>
Subject: Re: [Caml-list] date - waiting for 64-bit (was: Gripes with array)
On 09 Sep 2004, at 04:55, Samuel Lelievre wrote:
>
> In the meanwhile, is there a way to work around the following?
>
> ------------------------------------------------------------------
>>        Caml Light version 0.75
>
> ##open "unix";;
> #time ();;
> - : int = -1052752875
> #gmtime (time ());;
> - : tm =
>  {tm_sec = 51; tm_min = 38; tm_hour = 8; tm_mday = 22; tm_mon = 7;
>   tm_year = 36; tm_wday = 6; tm_yday = 234; tm_isdst = false}
> #
> ------------------------------------------------------------------

Shameless promotion: after you migrate away from Caml Light to OCaml 
3.08.1, you may want to have a look at the Cf library in OCaml NAE 
project on SF.Net <URL:http://www.sf.net/projects/ocnae/>, where you 
will find an implementation of Daniel Bernstein's TAI64 time 
representation.

If you are serious about working with values of standard time, then the 
Unix time functions are not your friends.  They have lots of twisty 
little constraints on the utility of the values they give and take that 
are not at all intuitive.


-- 
j h woodyatt <jhw@wetware.com>
markets are only free to the people who own them.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners