allow URL(...,language=...) with parametric router, thanks Jonathan

This commit is contained in:
mdipierro committed 2014-01-14 22:17:28 -06:00
1 parent 391bdf5cd4
commit 34bbb376be
5 files changed
+52 -14

No files matched your search

+3 -1
View File
@@ -2258,9 +2258,11 @@ class IS_DATE(Validator):
format = format.replace('%Y', y)
if year < 1900:
year = 2000
d = datetime.date(year, value.month, value.day)
if self.timezone is not None:
d = datetime.datetime(year, value.month, value.day)
d = d.replace(tzinfo=utc).astimezone(self.timezone)
else:
d = datetime.date(year, value.month, value.day)
return d.strftime(format)