Bubfix for dates

bzr revid: fabian@tinyerp.com-20080806140340-23pmx0ihuqbbga0a
This commit is contained in:
Fabian Semal
2008-08-06 16:03:40 +02:00
parent 5bcd697627
commit 612cd6dbf0
+6 -3
View File
@@ -189,11 +189,14 @@ class _date_format(str, _format):
def __str__(self):
if not self.object._context:
return self.name
if self.name:
datedata = time.strptime(self.name, DT_FORMAT)
return time.strftime(locale.nl_langinfo(locale.D_FMT).replace('%y', '%Y'),
try :
datedata = time.strptime(self.name, DT_FORMAT)
return time.strftime(locale.nl_langinfo(locale.D_FMT).replace('%y', '%Y'),
datedata)
return ''
except :
pass
_fields_process = {
'float': _float_format,