Bug 60074 - Create date property with offset with colon cannot be parsed
Summary: Create date property with offset with colon cannot be parsed
Status: RESOLVED WORKSFORME
Alias: None
Product: POI
Classification: Unclassified
Component: OPC (show other bugs)
Version: 3.14-FINAL
Hardware: PC Linux
: P2 major (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-31 14:39 UTC by Joaquin Montesinos
Modified: 2016-09-12 13:45 UTC (History)
0 users



Attachments
Core.xml with the timestamp with colon (804 bytes, application/xml)
2016-09-01 07:31 UTC, Joaquin Montesinos
Details
file with core.xml swapped out with example posted in earlier attachment (6.67 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2016-09-09 17:03 UTC, Tim Allison
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joaquin Montesinos 2016-08-31 14:39:42 UTC
If the created date ends with an offset that contains colon on it (e.g.: "2016-08-17T07:13:06+00:00")


Please refer to this StackOverflow post for more details, as the error described there is the same I've found.

http://stackoverflow.com/questions/36522278/exceptionorg-apache-poi-openxml4j-exceptions-invalidformatexception-date-not-w
Comment 1 Tim Allison 2016-08-31 16:55:33 UTC
Can you check with a more recent version of POI?  I think we fixed this in https://bz.apache.org/bugzilla/show_bug.cgi?id=59183.

If we didn't, would you be able to supply a triggering file?
Comment 2 Joaquin Montesinos 2016-09-01 07:31:06 UTC
Created attachment 34188 [details]
Core.xml with the timestamp with colon
Comment 3 Joaquin Montesinos 2016-09-01 07:34:56 UTC
Unfortunately the file contains sensitive data and I cannot upload it.
But I've attached the core.xml extracted from the file with issues, if using a zip utility you replace the core.xml of a valid XLSX with this one, the issue can be reproduced.

I've tested with version 3.13 (As suggested in the related bug you posted) and it works.
I've, also, tested with version 3.15-beta2 (Last one I've seen in maven repo) and it still fails.

Hope this help.
Comment 4 Tim Allison 2016-09-01 10:58:21 UTC
Yes.  Thank you.  I'll take a look in the next few days.
Comment 5 Tim Allison 2016-09-09 16:47:10 UTC
I replaced a docx file with your attachment, and all works with Tika trunk, which means POI-3.15-beta1.

Let me know if you are still having problems with poi >= POI-3.15-beta1.

Application-Name: Microsoft Office Word
Application-Version: 12.0000
Content-Length: 8382
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
Creation-Date: 2016-08-17T07:13:06Z
Last-Author: krajee
Last-Modified: 2016-08-17T07:13:06Z
Last-Save-Date: 2016-08-17T07:13:06Z
Manager: MyManager
Page-Count: 1
Template: Normal.dotm
Total-Time: 1
X-Parsed-By: org.apache.tika.parser.DefaultParser
X-Parsed-By: org.apache.tika.parser.microsoft.ooxml.OOXMLParser
X-TIKA:digest:MD5: 4f7dd54a6bf8651c7b77e33e010924ce
X-TIKA:digest:SHA256: a70c09b5b81d0da0feb86ffdc4af115665b00d5c46ea5078243b021d0f850b98
date: 2016-08-17T07:13:06Z
dc:description: Grid export generated by Krajee ExportMenu widget (yii2-export)
dc:publisher: Wygwam
dcterms:created: 2016-08-17T07:13:06Z
dcterms:modified: 2016-08-17T07:13:06Z
description: Grid export generated by Krajee ExportMenu widget (yii2-export)
extended-properties:AppVersion: 12.0000
extended-properties:Application: Microsoft Office Word
extended-properties:Company: Wygwam
extended-properties:Manager: MyManager
extended-properties:Template: Normal.dotm
extended-properties:TotalTime: 1
meta:creation-date: 2016-08-17T07:13:06Z
meta:last-author: krajee
meta:page-count: 1
meta:save-date: 2016-08-17T07:13:06Z
modified: 2016-08-17T07:13:06Z
publisher: Wygwam
resourceName: tmp.docx
xmpTPg:NPages: 1
Comment 6 Tim Allison 2016-09-09 17:02:03 UTC
Sorry, didn't read your followup closely enough.  I upgraded a local copy of Tika to poi-3.15-beta2 and tested with an xlsx file.  I'm not able to reproduce the problem:

<meta name="date" content="2016-08-17T07:13:06Z" />
<meta name="X-Parsed-By" content="org.apache.tika.parser.DefaultParser" />
<meta name="X-Parsed-By" content="org.apache.tika.parser.microsoft.ooxml.OOXMLParser" />
<meta name="dc:description" content="Grid export generated by Krajee ExportMenu widget (yii2-export)" />
<meta name="extended-properties:AppVersion" content="16.0300" />
<meta name="meta:creation-date" content="2016-08-17T07:13:06Z" />
<meta name="extended-properties:Application" content="Microsoft Excel" />
<meta name="meta:last-author" content="krajee" />
<meta name="extended-properties:Company" content="" />
<meta name="Creation-Date" content="2016-08-17T07:13:06Z" />
<meta name="description" content="Grid export generated by Krajee ExportMenu widget (yii2-export)" />
<meta name="dcterms:created" content="2016-08-17T07:13:06Z" />
<meta name="Last-Author" content="krajee" />
<meta name="Last-Modified" content="2016-08-17T07:13:06Z" />
<meta name="dcterms:modified" content="2016-08-17T07:13:06Z" />
<meta name="Last-Save-Date" content="2016-08-17T07:13:06Z" />
<meta name="Application-Version" content="16.0300" />
<meta name="protected" content="false" />
<meta name="meta:save-date" content="2016-08-17T07:13:06Z" />
<meta name="Application-Name" content="Microsoft Excel" />
<meta name="modified" content="2016-08-17T07:13:06Z" />
<meta name="publisher" content="" />
<meta name="Content-Type" content="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" />
<meta name="dc:publisher" content="" />
<title></title>
</head>
<body><div><h1>Sheet1</h1>
<table><tbody /></table>
</div>
</body></html>
Comment 7 Tim Allison 2016-09-09 17:03:51 UTC
Created attachment 34225 [details]
file with core.xml swapped out with example posted in earlier attachment

I'm attaching the test file that I used.
Comment 8 Joaquin Montesinos 2016-09-12 07:13:38 UTC
I have re-tested the original file with version 3.15-beta2, but this time launching the tests using command-line instead of intellij IDE which seems not to be aware of the change of library version, and with version 3.15-beta2 works as expected.

We will wait until release version 3.15 is out to upgrade.

Thanks for the help, and sorry for the inconveniences.
Comment 9 Tim Allison 2016-09-12 13:45:48 UTC
> Thanks for the help, and sorry for the inconveniences.

No problem at all.  Thank you for opening this issue.  Please let us know what else you find!