[
https://issues.apache.org/jira/browse/PDFBOX-3352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15288917#comment-15288917
]
Robert Šiška commented on PDFBOX-3352:
--------------------------------------
Yes, thank you. Something along these lines is already my workaround.
Even explicitly setting {{calendarValue.getTimeZone().setID("GMT+11:30");}}
does fix it.
IMHO, while the offset values are actually correct, setting the timezone id
should be part of DateConverter... Feel free to close this ticket, if you feel
otherwise ;)
P.S.: Just found out that 'Etc/GMT+2' pattern is not a good idea, because you
can't specify some offsets ('Etc/GMT+11:30' is invalid, for example).
> 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
> Attachments: test.pdf
>
>
> 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]