[Zope3-dev] zc.datetimewidget+UTC exception
Adam Groszer
adamg at fw.hu
Mon Jul 17 12:53:40 EDT 2006
Hi there,
Anybody tried to use the above?
For me it raises
Module zope.app.form.utility, line 348, in getWidgetsData
Module zope.app.form.browser.widget, line 295, in getInputValue
Module zc.datetimewidget.datetimewidget, line 123, in _toFieldValue
res = normalizeDateTime(res, self.request)
Module zc.datetimewidget.datetimewidget, line 48, in normalizeDateTime
dt = zc.i18n.date.normalize(request, dt)
Module zc.i18n.date, line 74, in normalize
tzu = tzinfo.fromutc(dt).tzinfo
ValueError: fromutc: dt.tzinfo is not self
Seems like that happens when in zc.i18n.date tzinfo == UTC
def normalize(request, dt):
if dt.tzinfo is None:
tzinfo = ITZInfo(request)
else:
tzinfo = dt.tzinfo
tzu = tzinfo.fromutc(dt).tzinfo
Anyway normalizing an UTC datetime to UTC is useless?!?!?
So if nobody goes against I'll correct that.
--
Best regards,
Adam mailto:adamg at fw.hu
--
Quote of the day:
Opinions are flexible prejudices.
- Gerald Horton Bath
More information about the Zope3-dev
mailing list