[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] Unix.tm, CLOCK: date handling in MirageOS



Le lundi, 22 juin 2015 Ã 17:05, Hannes Mehnert a Ãcrit :
> Since I'm not aware of all the OCaml libraries, I wanted to see whether a 
> small pure calendar
> library already exists in OCaml (because I expect others: irmin, imap,
> ... to face the same issue).

What do you need exactly ? There's a difference between a) making calendar 
field artithmetic b) getting POSIX timestamps out of/to the various insane 
timestamps formats that exist in a multitude of obscure RFCs and c) simply 
decomposing POSIX timestamps to gregorian calendar fields and back 
(Unix.{gmtime,mktime}). Would the proposed Ptime module which would provide (c) 
(and maybe a RFC 3339 codec along the way) solve your problem or not ?  

If you want a pure OCaml library for a) there's the calendar library [1] but I 
personally find its interface confusing and error prone.

Best,

Daniel

[1] http://calendar.forge.ocamlcore.org/doc/



_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.