You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2014/06/07 23:33:01 UTC

[jira] [Commented] (PDFBOX-2122) FontBox's TTFDataStream doesn't set timezone in readInternationalDate

    [ https://issues.apache.org/jira/browse/PDFBOX-2122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14020985#comment-14020985 ] 

Tilman Hausherr commented on PDFBOX-2122:
-----------------------------------------

If we change something, do you have a test that can show that the change produces something correct?

Or can you change it yourself locally and test it? I'd change
{code}
GregorianCalendar cal = new GregorianCalendar(1904, 0, 1);
{code}
to
{code}
Calendar cal = GregorianCalendar.getInstance(TimeZone.getTimeZone("UTC"));
cal.set(1904, 0, 1, 0, 0, 0);
{code}


> FontBox's TTFDataStream doesn't set timezone in readInternationalDate
> ---------------------------------------------------------------------
>
>                 Key: PDFBOX-2122
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2122
>             Project: PDFBox
>          Issue Type: Bug
>          Components: FontBox
>            Reporter: Tim Allison
>            Priority: Trivial
>
> TTFDataStream doesn't set the timezone for the calendar. GregorianCalendar defaults to the system's timezone.  This means that people in different timezones will get slightly different dates.  (TIKA-1325).
> One TTF Spec (https://developer.apple.com/fonts/TTRefMan/RM06/Chap6.html) doesn't specify the timezone, but my guess would be UTC...except that it is Apple, so maybe it's Cupertino. :)



--
This message was sent by Atlassian JIRA
(v6.2#6252)