[Python-checkins] python/dist/src/Misc NEWS,1.599,1.600

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Fri, 03 Jan 2003 22:03:17 -0800


Update of /cvsroot/python/python/dist/src/Misc
In directory sc8-pr-cvs1:/tmp/cvs-serv8819/python/Misc

Modified Files:
	NEWS 
Log Message:
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>).


Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.599
retrieving revision 1.600
diff -C2 -d -r1.599 -r1.600
*** NEWS	3 Jan 2003 22:35:24 -0000	1.599
--- NEWS	4 Jan 2003 06:03:15 -0000	1.600
***************
*** 27,35 ****
  
    today() and now() now round system timestamps to the closest
!   microsecond <http://www.python.org/sf/661086>.
  
    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).
  
    The tzinfo methods utcoffset() and dst() must return a timedelta object
--- 27,39 ----
  
    today() and now() now round system timestamps to the closest
!   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, 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
***************
*** 40,43 ****
--- 44,53 ----
    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