Comment 3 for bug 290254

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

With a date property (value 2001/10/10) the DateTime instance has this:

>>> from pprint import pprint
>>> pprint(app.xx.datum.__dict__)
{'_aday': 'Wed',
 '_amon': 'Oct',
 '_d': 36806.916666666664,
 '_day': 10,
 '_dayoffset': 3,
 '_fday': 'Wednesday',
 '_fmon': 'October',
 '_hour': 0,
 '_millis': 1002664800000L,
 '_minute': 0,
 '_month': 10,
 '_nearsec': 0.0,
 '_pday': 'Wed.',
 '_pm': 'am',
 '_pmhour': 12,
 '_pmon': 'Oct.',
 '_second': 0.0,
 '_t': 1002664800.0,
 '_tz': 'GMT+2',
 '_year': 2001,
 'time': 0.91666666666424135}
>>>

After moving the Data.fs to Zope 2.11 I can reproduce the issue

>>> app.xx.datum
DateTime('2001/10/10')

>>> app.xx.datum.strftime('%Y')
'2008'

>>> app.xx.datum.__dict__
{'_amon': 'Oct', '_aday': 'Wed', '_pmon': 'Oct.', '_hour': 0, '_fmon': 'October', '_pday': 'Wed.', '_fday': 'Wednesday', '_pm': 'am', '_t': 1002664800.0, '_minute': 0, '_micros': 1225201190428991L, '_millis': 1002664800000L, '_d': 36806.916666666664, '_second': 0.0, '_tz': 'GMT+2', '_month': 10, '_timezone_naive': False, '_day': 10, '_year': 2001, '_nearsec': 0.0, '_pmhour': 12, '_dayoffset': 3, 'time': 0.91666666666424135}
>>> from pprint import pprint
>>> pprint(app.xx.datum.__dict__)
{'_aday': 'Wed',
 '_amon': 'Oct',
 '_d': 36806.916666666664,
 '_day': 10,
 '_dayoffset': 3,
 '_fday': 'Wednesday',
 '_fmon': 'October',
 '_hour': 0,
 '_micros': 1225201190428991L,
 '_millis': 1002664800000L,
 '_minute': 0,
 '_month': 10,
 '_nearsec': 0.0,
 '_pday': 'Wed.',
 '_pm': 'am',
 '_pmhour': 12,
 '_pmon': 'Oct.',
 '_second': 0.0,
 '_t': 1002664800.0,
 '_timezone_naive': False,
 '_tz': 'GMT+2',
 '_year': 2001,
 'time': 0.91666666666424135}
>>>