Zope 2.7 date international configuration
Hi all, I'm just beginning to move my applications to Zope 2.7 and I've found something estrange related to dates. In the new zope.conf you can enable an option: "datetime-format international" I've enabled it hoping that fields named field_name:date will be handled as dates in international format. But not, they are handled as dates in "us" format. Seeing the ZPublisher/Converters.py I see that fields in the form field_name:date_international are handled OK. But fields with just ":date" are hanled with default DateTime format. Seeing DateTime module, it seems that this default format should be in an environment variable DATETIME_FORMAT. Also, it seems that this variable should be defined during Zope startup. But the result is that with :date fields, "us" format is always used, not following the instruction in zope.conf. Perhaps there is some problem in Zope configuration machinery. Anybody else with this problem ? -- Santi Camps http://zetadb.sourceforge.net
Santi Camps wrote:
But the result is that with :date fields, "us" format is always used, not following the instruction in zope.conf. Perhaps there is some problem in Zope configuration machinery.
Yep, sounds like a bug, stick it in the collector :-) cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
I just commited a patch for DateTime.py on the Zope CVS HEAD that should fix the problem. -aj --On Dienstag, 2. März 2004 12:04 Uhr +0100 Santi Camps <santi@zetadb.com> wrote:
Hi all,
I'm just beginning to move my applications to Zope 2.7 and I've found something estrange related to dates. In the new zope.conf you can enable an option: "datetime-format international"
I've enabled it hoping that fields named field_name:date will be handled as dates in international format. But not, they are handled as dates in "us" format.
Seeing the ZPublisher/Converters.py I see that fields in the form field_name:date_international are handled OK. But fields with just ":date" are hanled with default DateTime format.
Seeing DateTime module, it seems that this default format should be in an environment variable DATETIME_FORMAT. Also, it seems that this variable should be defined during Zope startup.
But the result is that with :date fields, "us" format is always used, not following the instruction in zope.conf. Perhaps there is some problem in Zope configuration machinery.
Anybody else with this problem ?
participants (3)
-
Andreas Jung -
Chris Withers -
Santi Camps