> > > However, numpy datetime is optimized for compact storage and fast > computation of absolute deltas (actual hours, minutes, seconds... not > calendar units like "the next day" ). > > Except that ironically it actually can't compute absolute deltas > accurately with one second resolution, because it does the POSIX time thing > of pretending that all UTC days have the same number of seconds, even > though this is not true (leap seconds). > > This isn't really relevant to anything else in this thread, except as a > reminder of how freaky date/time handling is. >
Maybe not directly relevant, but also very clearly why one should ideally not use these at all! Perhaps even less relevant, but if you do need absolute times (and thus work with UTC or TAI or GPS), have a look at astropy's `Time` class. It does use two doubles, but with that maintains "sub-nanosecond precision over times spanning the age of the universe" [1]. And it even converts to strings nicely! -- Marten [1] http://docs.astropy.org/en/latest/time/index.html
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.org/mailman/listinfo/numpy-discussion