I need to convert a time, expressed in /mm/dd hh:mm:ss form, into a
floating point.
The conversion has to be done in GMT, but the real point is, the conversion
must NOT change due to daylight savings time.
Ocaml seems to have only one conversion function, however: Unix.mktime,
which takes a ti
If you want a fine-grained timezones and daylight saving times handling, you
may use a dedicated library for date and time, such that Calendar (wich is
used by PG'OCaml to represent SQL date/time values) :
http://calendar.forge.ocamlcore.org/
___
Caml-lis
blue storm wrote:
> If you want a fine-grained timezones and daylight saving times handling, you
> may use a dedicated library for date and time, such that Calendar (wich is
> used by PG'OCaml to represent SQL date/time values) :
> http://calendar.forge.ocamlcore.org/
I really like the way the Ne
The TZ module in Core could also be helpful here.
y
On Sat, Mar 6, 2010 at 4:53 AM, Luca de Alfaro wrote:
> I need to convert a time, expressed in /mm/dd hh:mm:ss form, into a
> floating point.
> The conversion has to be done in GMT, but the real point is, the conversion
> must NOT change d
Luca de Alfaro wrote:
I need to convert a time, expressed in /mm/dd hh:mm:ss form, into a
floating point.
The conversion has to be done in GMT, but the real point is, the
conversion must NOT change due to daylight savings time.
Ocaml seems to have only one conversion function, however: Uni
Thanks to all!
I see, I am glad there are good alternative libraries!
For my problem, I preferred to avoid having dependence on one more library
for only 10 lines of code, so I wrote some code to do the conversion. It
works only for dates after 1970, and it is somewhat inelegant; it is here:
http
Sorry: wrong link. The code is here:
http://luca.dealfaro.org/converting-gmt-time-into-unix-time-in-ocaml
On Sun, Mar 7, 2010 at 10:05 AM, Luca de Alfaro wrote:
> Thanks to all!
>
> I see, I am glad there are good alternative libraries!
> For my problem, I preferred to avoid having dependence o