Re: microseconds ought to be enough for anybody



On Mon, 2010-11-01 at 10:06 -0700, John Ralls wrote:
> +1
> 
> I don't see any reason to have a replacement for GDate. Just add any
> extra functionality it provides to GDateTime -- which, with int64,
> will be good for +/- 290,000 years from whatever its epoch date is,
> with microsecond resolution. That should be sufficient for everyone
> except astronomers, who have their own time libraries anyway.

GDateTime is currently bounded between Gregorian dates 0001-01-01
(proleptic) and 9999-12-31.  I can't see any reason that we should
change that.

GDateTime was originally proposed to double as a 'date' type by having
"midnight on day" to roughly stand in for "day", with some APIs to make
that easier.

It turns out that there are a lot of reasons that you don't want to do
that, so any API that encouraged that sort of use was removed with the
idea being that we would add a proper construct for this in the future.

> As for bizarre OSes with epochs beginning at some time before the
> common era, well, if glib is ever ported to one a simple ifdef can
> just add the correction value and be done with it. No worries.

That's my current line of thinking.

Cheers



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