[Zope] checking the date
Philippe Vignaux
philippe.vignaux at africamuseum.be
Fri Nov 21 09:29:47 EST 2003
Hi all !
I'm using Zope page Template with python scripts.
I have a date in my form and when it is submitted, a python scripts checks
the consistence of the date as follow :
from DateTime import DateTime
try:
start_date = DateTime(REQUEST['datnais'],'central europe standard time')
except:
print 'error'
return printed
The date is inputed under this format : YYYY/MM/DD ex : 2003/02/15
The problem : the "error" message is always issued even when dates are
ok (and whatever the date format).
try:
start_date = DateTime( REQUEST['datnais'] )
works but only accepts date under format YYYY/DD/MM as in the US but I
have to work as GMT+1
Thanks in advance for any help.
Our setup:
Windows 2000 server ServP3
Zope 2.6.2
CMF 1.4
Ph.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.zope.org/pipermail/zope/attachments/20031121/6932c65f/attachment.html
More information about the Zope
mailing list