Tilman Hausherr created PDFBOX-6107:
---------------------------------------
Summary: Serializing produces date "1-01-01T00:00:00+01:00"
Key: PDFBOX-6107
URL: https://issues.apache.org/jira/browse/PDFBOX-6107
Project: PDFBox
Issue Type: Bug
Components: XmpBox
Affects Versions: 3.0.6 PDFBox, 2.0.35
Reporter: Tilman Hausherr
Assignee: Tilman Hausherr
Fix For: 2.0.36, 3.0.7 PDFBox, 4.0.0
To verify my work in PDFBOX-6099 I did a mass test with parsing XMP,
serializing the data if the parsing worked, and then trying to parse again.
This was successfully parsed:
{code:xml}
<xap:CreateDate>0000-01-01</xap:CreateDate>
{code}
The output produced by serializing failed to parse with "Failed to instantiate
DateType property with value 1-01-01T00:00:00+01:00":
{code:xml}
<xap:CreateDate>1-01-01T00:00:00+01:00</xap:CreateDate>
{code}
The cause is that we assume that a year has 4 digits when writing, but it could
have less. (If this isn't allowed, then we should caught it earlier anyway)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]