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
This commit is contained in:
Markus Mohrhard 2013-04-30 00:06:54 +02:00
parent f9cd73ebe1
commit dd24f18545

View File

@ -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 );