summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-04-30 00:06:54 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-04-30 00:17:30 +0200
commitdd24f18545d1e041b2dc427ce4d6c28fbd39d76d (patch)
tree130cad4e87dff81e4e133ac8d149af0da25f9688 /oox
parentf9cd73ebe116cd95247aff1963e2f5b4ec671dfa (diff)
now ooxml files are accepted by Excel again
Yes, a simple test would have answered the question in the comment and made clear that nanoseconds are not accepted by MSO. Let's go with normal seconds as MSO does. It seems it also accepts 1/100s but who really needs that for a file timestamp. Change-Id: Iaec6f9c08dc94d5086b83cb4bf520d0053b71b28
Diffstat (limited to 'oox')
-rw-r--r--oox/source/core/xmlfilterbase.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 4cd7665be98c..fe2055e6eda2 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -482,12 +482,9 @@ writeElement( FSHelperPtr pDoc, sal_Int32 nXmlElement, const util::DateTime& rTi
FSEND );
char pStr[200];
- // FIXME: my guess is that precision greater than millisecond in undesirable
- // (forbidden by the standard???)
- snprintf( pStr, sizeof( pStr ), "%d-%02d-%02dT%02d:%02d:%02d.%09" SAL_PRIuUINT32 "Z",
+ snprintf( pStr, sizeof( pStr ), "%d-%02d-%02dT%02d:%02d:%02dZ",
rTime.Year, rTime.Month, rTime.Day,
- rTime.Hours, rTime.Minutes, rTime.Seconds,
- rTime.NanoSeconds);
+ rTime.Hours, rTime.Minutes, rTime.Seconds );
pDoc->write( pStr );