Current date and time
François Pinard
pinard at iro.umontreal.ca
Wed Jun 21 09:06:27 EDT 2000
[William Park]
> >>> import time
> >>> time.ctime(time.time())
> 'Tue Jun 20 01:02:03 2000'
Let me advocate (or rather, let Markus Kuhn) for ISO 8601. I always found a
bit miserable that, by default, dates are not international. Let me see...
Yes, this was sent on 2000-02-24:
From: Markus Kuhn <Markus.Kuhn at cl.cam.ac.uk>
Subject: [tar 1.13.17] Problems with USE_OLD_CTIME
To: ro at TechFak.Uni-Bielefeld.DE, bug-tar at gnu.org
Cc: pinard at IRO.UMontreal.CA, karl at cs.umb.edu
Rainer Orth <ro at TechFak.Uni-Bielefeld.DE> write 2000-02-03:
>
> I've never understood why GNU tar changed to use the ISO time
> format instead of the traditional ctime-based format.
The two arguments brought forwards at the time that I remember were:
- ISO 8601 is considered to be acceptable in practically all Gregorian
locales, while the old format isn't, as it contains English words. A
locale-dependent output format would make its automatic post processing
horribly difficult, which is why locale-dependent date formatting
should be considered with caution.
- The all-numeric bigendian nature of ISO 8601 actually makes
comparing dates in columns by humans significantly faster and
easier, so we considered ISO 8601 not only more practical for
i18n purposes, but also more user-friendly for English users.
(Experiment: try to find the oldest and newest date/time in a
printed 100-entry column of dates/times both when written
in ISO 8601 and in the old ctime format.)
http://www.cl.cam.ac.uk/~mgk25/iso-time.html
Markus
--
François Pinard http://www.iro.umontreal.ca/~pinard
More information about the Python-list
mailing list