Time library discussion (reprise)

Simon Marlow simonmar at microsoft.com
Tue Nov 11 13:34:16 EST 2003

> On Tue, 11 Nov 2003 12:44:59 -0000
> "Simon Marlow" <simonmar at microsoft.com> wrote:
> > This has been demonstrated - recently by Juanma 
> Barranquero's library
> > posted to the Haskell list,
> I think you're referring to Stefan Karrmann's library. I just did a
> couple comments about it.

Oops!  My apologies.

> IMHO, Haskell should have a simple module which allowed to manipulate
> dates and times in UTC (and convert to/from localtimes, and perhaps
> MJD/JD), and, as an extension, a TAI module for the (probably 
> very few)
> people who needs that kind of precision.

Let's talk in concrete terms.  Could you propose an API for what you
have in mind for the basic UTC functionality?

Presumably, without TAI support, the library will be unable to do
accurate calendar calculations at the second level (i.e. "add S seconds
to time T"), although it will be able to do larger scale calendar
calculations (i.e. adding days, months, etc.).  Or maybe you provide the
second-level calculations but document that they don't take into account
leap seconds?

> I know that I've been programming quite a few years and I've never
> needed to know TAI times, nor ignoring the leap seconds have been a
> problem. And, till very recently, I was working for a VoIP carrier, so
> you can bet we manipulated dates, times and durations 
> *constantly*. I'm
> not saying there aren't problem domains where that level of 
> precision is
> required. Just they're not that common, I think.

Ok, it's useful to have someone with experience of actually using this
stuff for Real Work.  As always, I'm happy to go along with a concensus
if one can be reached.


More information about the Libraries mailing list