summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2003-01-04 06:03:15 (GMT)
committerTim Peters <tim.peters@gmail.com>2003-01-04 06:03:15 (GMT)
commitadf642038ee02b02165c3852a72217c1b65d8715 (patch)
treef56c8a77815f7fa05c9b10172e4cfe32c3eeb492 /Misc/NEWS
parent8ec78814c138a24038d104507879bf11df09dcce (diff)
downloadcpython-adf642038ee02b02165c3852a72217c1b65d8715.zip
cpython-adf642038ee02b02165c3852a72217c1b65d8715.tar.gz
cpython-adf642038ee02b02165c3852a72217c1b65d8715.tar.bz2
A new implementation of astimezone() that does what we agreed on in all
cases, plus even tougher tests of that. This implementation follows the correctness proof very closely, and should also be quicker (yes, I wrote the proof before the code, and the code proves the proof <wink>).
Diffstat (limited to 'Misc/NEWS')
-rw-r--r--Misc/NEWS14
1 files changed, 12 insertions, 2 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 731095e..89c7683 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -26,11 +26,15 @@ Extension modules
- datetime changes:
today() and now() now round system timestamps to the closest
- microsecond <http://www.python.org/sf/661086>.
+ microsecond <http://www.python.org/sf/661086>. This repairs an
+ irritation most likely seen on Windows systems.
In dt.asdatetime(tz), if tz.utcoffset(dt) returns a duration,
ValueError is raised if tz.dst(dt) returns None (2.3a1 treated it
- as 0 instead).
+ as 0 instead, but a tzinfo subclass wishing to participate in
+ time zone conversion has to take a stand on whether it supports
+ DST; if you don't care about DST, then code dst() to return 0 minutes,
+ meaning that DST is never in effect).
The tzinfo methods utcoffset() and dst() must return a timedelta object
(or None) now. In 2.3a1 they could also return an int or long, but that
@@ -40,6 +44,12 @@ Extension modules
The example tzinfo class for local time had a bug. It was replaced
by a later example coded by Guido.
+ datetimetz.astimezone(tz) no longer raises an exception when the
+ input datetime has no UTC equivalent in tz. For typical "hybrid" time
+ zones (a single tzinfo subclass modeling both standard and daylight
+ time), this case can arise one hour per year, at the hour daylight time
+ ends. See new docs for details.
+
Library
-------