Monty, James T schreef: > >Leap seconds. DateTime doesn't really do them correctly > > Please explain this. I've always thought DateTime *does* handle leap > seconds correctly.
DateTime handles them correctly for dates between the introduction of leap seconds (1972) and the first yet-to-be-announced future leap second. The only exception is DT->epoch(), which ignores leap seconds to be consistent with the POSIX standard. Between 1961 and 1972, UTC used a second of variable length, and frequent fractional leap seconds. These are not implemented in DateTime. Before 1961, UTC didn't exist; it is unclear what DateTime objects before 1961 actually represent. Future dates, after the next unannounced leap second, are also incorrect; for the current version of DateTime, this could be as recent as July 1, 2009, I believe. That cannot be helped (although you could argue that DateTime should automatically update its table of leap seconds every six months). Eugene
