On Fri, 20 Feb 2009, Dave Rolsky wrote: > > > Renamed Temporal::Instant to Temporal::DateTime > > > > Hmm. We had some mailing list discussion about this, and agreed on > > Instant. I'd like to see your reasons in favour of DateTime. > > Because DateTime makes sense and is a clear description of what the thing > is. Instant is incredibly ambiguous, and not a common term for such > things.
I think people are starting to argue at cross purposes here. An instant and a date-time are NOT the same thing. Barring limitations imposed by the speed of light and aberrations caused by relativity, and an instant occurs everyone at the same time. A date-time, if it's really true to its name, represents some 40-ish different instants, depending on which timezone it's interpreted in. At some point you have to decide which fictions are useful vs where you really need to hold out for reality. * First fiction: the speed of light is infinite, so instants really are universal. Unless you're writing GPS control software, you're probably OK with this. * Second fiction: the earth rotates at exactly 1/1440 rpm, so UT1=UT. POSIX's "epoch seconds" pretty much enforce belief in this, so if you don't want to believe it, you're going to have to build your own time libraries from scratch. * Third fiction: the day matches the rotation of the earth. In some places the law requires you both to believe and disbelieve this simultaneously. (For example, it may require that you're billed 10 minutes for a phone call that started at 01:55 and finished at 03:05.) * Fourth fiction: it's legally the same time everywhere on earth, especially for registration of births, deaths and marriages. (For example, if I move from my native New Zealand to, Hawaii, I will 23 hours older at my next legal birthday than I would be if I remained in NZ. Probably I'd be a day younger when I die too.) * Fifth fiction: everyone speaks English. It seems there is scope for multiple types, starting with Instants (which must believe fiction 1 and may or may not believe fiction 2), DateTime (which is agnostic about fiction 3), and "Localtime" and "Date" (which believe fictions 3 and 4). For each of these you have corresponding variants of Duration. So my question is, which of these fictions should the core temporal type(s) believe or disbelieve? Then we should name them appropriately. -Martin PS: IMHO core types should believe 1 & 2, and disbelieve 3 & 4, and avoid doing anything that depends on believing 5.