IS_DATE() formatter sets
d = datetime.date(year, value.month, value.day)
and if self.timezone is not None it calls d.replace with the tzinfo keyword, this results in the exception:
File "/home/www-data/web2py/gluon/validators.py", line 2263, in formatter
d = d.replace(tzinfo=utc).astimezone(self.timezone)
TypeError: 'tzinfo' is an invalid keyword argument for this function
Changing d to be a datetime.datetime instance returns the formatted date.
The relevant field is:
Field('deadline', 'date', requires=IS_DATE(timezone=pytz.timezone('America/Chicago'),
format='%Y-%m-%d'))
Should I be doing anything differently or does IS_DATE() need to be changed?
Web2py: 2.8.2-stable+timestamp.2013.11.28.13.54.07
Python: 2.7.3