DateTime.strftime %Z value is blank

Bug #143543 reported by Chris McDonough
20
Affects Status Importance Assigned to Milestone
DateTime
Invalid
Low
Unassigned

Bug Description

DateTime.strftime behaves differently across Zope revisions, leading me to think that it's broken in 2.8+.

Given the code:

>>> from DateTime import DateTime
>>> d = DateTime()
>>> d.strftime('%a %d %b %Y %I:%M %p %Z')

The Zope 2.7 branch produces:

'Wed 19 Oct 2005 10:25 AM EDT'

The Zope 2.8 branch and Zope HEAD produces:

'Wed 19 Oct 2005 10:27 AM '

Tags: bug zope
Revision history for this message
Andreas Jung (ajung) wrote :

Possibly the patch from #1780 introduced this new behavior. Given the fact that the timezone handling in DateTime seems to be borked in general and nobody understands why or knows how to fix....that's just a minor issue.

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

DateTime.strftime now defers to datetime.datetime.strftime for rendering. A datetime.datetime object is constructed from the DateTime object and has its strftime method called. The datetime.datetime object gets no time zone information because it expects it as a datetime.tzinfo instance, and right now I can't see a simple way to provide a suitable instance.

Changed in datetime:
status: New → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

The datetime project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/datetime.

Changed in datetime:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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