Reputation: 6136
I'm learning how to generate PDF with PDFBox. So far, I managed to create the document and to modify basic meta data.
I do have a problem with the date of creation, though. I tried many things, this being the most logical one:
//My PDDocument is called "document".
PDDocumentInformation info = document.getDocumentInformation();
info.setCreationDate(Calendar.getInstance());
The result, when right-clicking on the generated PDF and choosing "properties" is mar 28 jun 2011 12:28:36 CEST
. (mar
stands for "mardi", Tuesday in French). My problem is that the correct time should be 12:28:36 GMT+1.
When I print System.out.println(Calendar.getInstance());
, it returns (...)zone=sun.util.calendar.ZoneInfo[id="Europe/Zurich",(...)
(Full content on demand), which is correct!
So, where is the problem?
Upvotes: 3
Views: 1670
Reputation: 8466
There is no problem in you code. If you run it in france during dst, local time should be GMT+2. And GMT+2 is same as CEST.
Upvotes: 3