[Python-checkins] python/nondist/sandbox/datetime US.py,1.15,1.16

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Mon, 06 Jan 2003 08:24:16 -0800


Update of /cvsroot/python/python/nondist/sandbox/datetime
In directory sc8-pr-cvs1:/tmp/cvs-serv1265

Modified Files:
	US.py 
Log Message:
Repaired the "unspellable hour" doctest example to match current behavior.


Index: US.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/datetime/US.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** US.py	2 Jan 2003 21:01:19 -0000	1.15
--- US.py	6 Jan 2003 16:24:14 -0000	1.16
***************
*** 208,218 ****
  
  What happens when we convert that to Eastern?  astimezone detects the
! impossibilty of the task, and raises an exception.
  
  >>> paradox = phantom.astimezone(Eastern)
! Traceback (most recent call last):
! ...
! ValueError: astimezone():  the source datetimetz can't be expressed in the target timezone's local time
!  """
  
  __test__ = {'brainbuster': brainbuster_test}
--- 208,224 ----
  
  What happens when we convert that to Eastern?  astimezone detects the
! impossibilty of the task, and mimics the local clock's "repeat the 1:MM
! hour" behavior:
  
  >>> paradox = phantom.astimezone(Eastern)
! >>> printstuff(paradox)
! 2002-10-27 01:00:00-04:00
! EDT
! (2002, 10, 27, 1, 0, 0, 6, 300, 1)
! Sun Oct 27 01:00:00 2002
! 
! That isn't a UTC equivalent, although it would be if 1:00 were taken as being
! in EST.
! """
  
  __test__ = {'brainbuster': brainbuster_test}