[Python-checkins] peps: PEP 410: rephrase doc about datetime.datetime and datetime.timedelta
victor.stinner
python-checkins at python.org
Mon Feb 6 23:45:17 CET 2012
http://hg.python.org/peps/rev/bc6d1d34bcef
changeset: 4041:bc6d1d34bcef
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Mon Feb 06 23:45:48 2012 +0100
summary:
PEP 410: rephrase doc about datetime.datetime and datetime.timedelta
files:
pep-0410.txt | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/pep-0410.txt b/pep-0410.txt
--- a/pep-0410.txt
+++ b/pep-0410.txt
@@ -126,14 +126,15 @@
datetime.datetime only supports microsecond resolution, but can be enhanced
to support nanosecond.
-datetime.datetime has issues:
+datetime.datetime has issues with timezone. For example, a datetime object
+without timezone and a datetime with a timezone cannot be compared.
-- there is no easy way to convert it into "seconds since the epoch"
-- any broken-down time has issues of time stamp ordering in the
- duplicate hour of switching from DST to normal time
-- time zone support is flaky-to-nonexistent in the datetime module
+datetime.datetime has ordering issues with daylight saving time (DST) in the
+duplicate hour of switching from DST to normal time.
-datetime.datetime is also more complex than a simple number.
+datetime.datetime is not as well integrated than Epoch timestamps, some
+functions don't accept this type as input. For example, os.utime() expects a
+tuple of Epoch timestamps.
datetime.timedelta
------------------
@@ -141,10 +142,9 @@
As datetime.datetime, datetime.timedelta only supports microsecond resolution,
but can be enhanced to support nanosecond.
-Even if datetime.timedelta have most criteria, it was not selected because it
-is more complex than a simple number and is not accepted by functions getting
-timestamp inputs.
-
+datetime.timedelta is not as well integrated than Epoch timestamps, some
+functions don't accept this type as input. For example, os.utime() expects a
+tuple of Epoch timestamps.
.. _tuple-integers:
--
Repository URL: http://hg.python.org/peps
More information about the Python-checkins
mailing list