Portable general timestamp format, not 2038-limited

rossum rossum48 at coldmail.com
Sat Jun 23 18:04:01 EDT 2007


On Sat, 23 Jun 2007 13:37:14 -0700, James Harris
<james.harris.1 at googlemail.com> wrote:

>On 22 Jun, 23:49, Roger Miller <roger.mil... at nova-sol.com> wrote:
>...
>> My rule of thumb in situations like this is "When in doubt store it as
>> text".  The one format I am pretty sure we will still be able to deal
>> with in 2039.
>
>Interesting. I hadn't thought about using text. It would add to the
>storage a bit as each record is otherwise quite short. But this sounds
>like a good option and may help - at least while debugging - to see
>the raw date and time as digits. I will consider using this, perhaps
>as yyyymmddhhmmssttt.
You might prefer to use one of the ISO 8601 formats:
yyyymmddThhmmssttt or yyyy-mm-ddThh:mm:ss.ttt

http://www.cl.cam.ac.uk/~mgk25/iso-time.html

rossum




More information about the Python-list mailing list