DateTime toZone returning date /w no time

Bug #142521 reported by Bug Importer
0
Affects Status Importance Assigned to Milestone
DateTime
Fix Released
Low
Unassigned

Bug Description

It seems that when toZone() returns a time of exactly midnight, it returns the date only, ignoring the time.

From the command line I confirm the behavior (the first toZone() answer should be 2003/03/22 00:00:00 US/Eastern).

>>> from DateTime import DateTime
>>> d = DateTime('2003-03-22 05:00:00 UTC')
>>> d
DateTime('2003/03/22 05:00:00 Universal')
>>> d.toZone('US/Eastern')
DateTime('2003/03/22')
>>> DateTime('2003-03-22 05:00:01 UTC').toZone('US/Eastern')
DateTime('2003/03/22 00:00:01 US/Eastern')

Tags: bug zope
affects: zope2 → datetime
Revision history for this message
Jens Vagelpohl (dataflake-deactivatedaccount-deactivatedaccount) wrote :

I have removed this confusing special case:

http://svn.zope.org/?rev=115125&view=rev

This will be released with DateTime 2.12.5 and ship with Zope 2.12.11 and 2.13.0

Changed in datetime:
status: New → Fix Committed
assignee: nobody → Jens Vagelpohl (dataflake)
Changed in datetime:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.