[domino] format date before sending them to the ws

This commit is contained in:
Benjamin Dauvergne 2012-10-03 16:14:22 +02:00
parent 6c9aa78081
commit 5001e96ffb
1 changed files with 4 additions and 0 deletions

View File

@ -90,6 +90,10 @@ class SimpleObject(object):
v = getattr(self, local_name, None)
if v is None:
continue
if isinstance(v, (datetime.date, datetime.datetime)):
v = v.strftime('%Y%m%d')
if remote_name.endswith('_DA') and '-' in v:
v = v.replace('-', '')
l.append(u'{0}: "{1}"'.format(remote_name, v))
return u','.join(l)