Portable general timestamp format, not 2038-limited

Robert Maas, see http://tinyurl.com/uh3t rem642b at yahoo.com
Sun Jun 24 21:14:08 EDT 2007


> From:  James Harris <james.harri... at googlemail.com>
> I have a requirement to store timestamps in a database. ...
> 1) subsecond resolution - milliseconds or, preferably, more detailed

How do you plan to deal with leap seconds?
- Stick to astronomical time, which is absolutely consistent but
   which drifts from legal time?
- Stick to legal time (UTC), which stalls by one second from time
   to time, causing time-difference calculations to be incorrect by
   varying numbers of seconds?
Only after you make *that* crucial decision, will it be reasonable
to consider milliseconds or other sub-second resolution.

As for the representation to store in the DB, somebody suggested
text, and I agree, with one clarification: Stick to US-ASCII, which
has been incorporated into UniCode hence is pretty much guaranteed
to be stable for longer than you care about.



More information about the Python-list mailing list