Commit 8c211bee authored by Nicolas Delaby's avatar Nicolas Delaby

Compute timestamp only if value is defined


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44294 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d2f4ea62
......@@ -1570,6 +1570,7 @@ class DateTimeWidget(Widget):
if not value and field.get_value('default_now'):
value = DateTime()
text_node = Element('{%s}%s' % (TEXT_URI, local_name), nsmap=NSMAP)
if value:
# http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#dateTime
attr_dict['{%s}date-value' % OFFICE_URI] = value.ISO8601()
# According http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Calc:_Date_%26_Time_functions
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment