Robert Šiška created PDFBOX-3352:
------------------------------------
Summary: Calendar values are parsed with unknown timezones
Key: PDFBOX-3352
URL: https://issues.apache.org/jira/browse/PDFBOX-3352
Project: PDFBox
Issue Type: Improvement
Components: Parsing
Affects Versions: 1.8.12
Reporter: Robert Šiška
Example of Calendar instance parsed from document:
{code}
java.util.SimpleTimeZone[id=unknown,offset=7200000,dstSavings=3600000,useDaylight=false,startYear=0,startMode=0,startMonth=0,startDay=0,startDayOfWeek=0,startTime=0,startTimeMode=0,endMode=0,endMonth=0,endDay=0,endDayOfWeek=0,endTime=0,endTimeMode=0]
{code}
Although calling e.g. {{timeZone.getDisplayName()}} shows correclty
'GMT+02:00', {{timeZone.toZoneId()}} fails with following stack trace:
{code}
java.time.zone.ZoneRulesException: Unknown time-zone ID: unknown
at
java.time.zone.ZoneRulesProvider.getProvider(ZoneRulesProvider.java:272)
at java.time.zone.ZoneRulesProvider.getRules(ZoneRulesProvider.java:227)
at java.time.ZoneRegion.ofId(ZoneRegion.java:120)
at java.time.ZoneId.of(ZoneId.java:411)
at java.time.ZoneId.of(ZoneId.java:359)
at java.time.ZoneId.of(ZoneId.java:315)
at java.util.TimeZone.toZoneId(TimeZone.java:556)
...
{code}
This is fixed in PDFBOX-1633 but although the fixVersion is 1.8.3, I couldn't
find the commit on 1.8 branch (only on 2.0)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]