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.