[Ocaml-i18n] Re: TimeZone in OCamlI18N

Matthieu Sozeau mattam at mattam.org
Fri Jun 11 08:48:01 PDT 2004


On Thursday 10 June 2004 22:55, Yamagata Yoriyuki wrote:
> OCamlI18N has a TimeZone type, but no concrete TimeZone is provided.
> Is there a plan to add them?  I have looked to tzdata, but it defines
> rather complex rules, and I am not sure OCamlI18N can work with them.

There is the default timezone (UTC) which you can access with TimeZone.get ().
Others should be added by parsing some timezone definitions. AFAICS, LDML 
suggest using Olson naming and tzdata, so i suppose it is the way to go.

> If there is no plan, 
Nope, no plan

> I will use Shawn Wagner's annextlib, though Unix 
> data functions are using (in my understanding) enviromental variables
> for TZ and hence need some care for a thread application.

As usual...

> What I want is parsing Last-Modified header of HTTP, which can contain
> 3-letter TZ name, for my personal tool.
>
> By the way, what do you think adding an absolute time type
> (independent from calenders and timezone), like Unix time_t.  Since
> OCaml has bignum, we do not have the problem of year 2038 problem.

time_t is relative to the Epoch (00:00:00 UTC, January 1, 1970)... What would 
you want to do with it that you can't do with Bigints ? 
-- 
BOFH Excuse #173: Recursive traversal of loopback mount points 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
Url : /pipermail/ocaml-i18n/attachments/20040611/108d0549/attachment.pgp 


More information about the Ocaml-i18n mailing list