In a PDF where CreationDate is like "D:20110603085808-04'00'" (American West Coast), the method PDDocumentInformation.getCreationDate does not return a calendar with a correctly set timezone : offset remains 0.
There is no problem with "D:20110603085808+04'00'" where offset is correct.
The problem is in org.apache.pdfbox.util.DateConverter that does not handle '-'.
Obvisouly, same problem with getModificationDate
I made this patch to fix my problem :
— DateConverter.java (revision 1133573)
+++ DateConverter.java (working copy)
@@ -251,6 +251,10 @@
//parseInt cannot handle the + sign
hours = Integer.parseInt( date.substring( 15, 17 ) );
+ else if (sign == '-')
hours = -Integer.parseInt( date.substring( 14, 16 ) );
It works, but I think there is much work to do on this method.