Bug 338162 - Timezone is not considered for Creation/Modification dates
Summary: Timezone is not considered for Creation/Modification dates
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 0.19.60
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-09 22:42 UTC by Luigi Toscano
Modified: 2021-03-29 21:40 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
PDF from beamerexample-prosper.tex (38.32 KB, application/pdf)
2014-08-11 21:20 UTC, Luigi Toscano
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luigi Toscano 2014-08-09 22:42:46 UTC
Open a PDF document where the values of CreationDate and/or ModDate fields contains a timezone, e.g. (D:20140810002948+02'00') (pdfinfo can show it).

The timezone is not considered in the respective fields of the Document Properties dialog, and the UTC time is shown instead; in the example above:
Saturday 09 August 2014 22:29:48
Comment 1 Albert Astals Cid 2014-08-11 10:38:16 UTC
Please attach such a file
Comment 2 Luigi Toscano 2014-08-11 21:20:17 UTC
Created attachment 88223 [details]
PDF from beamerexample-prosper.tex

beamerexample-prosper.tex is shipped with TeXLive (texlive-latex-recommended     2014.20140717-01 on my system). Generated on my system with pdflatex, CEST timezone (GMT+02). pdfinfo shows the correct time.
Comment 3 Albert Astals Cid 2014-08-11 22:55:29 UTC
Actually I think *we* show the correct time.

date is D:20140811231448+02'00'

since we are *not* showing the timezone, that means that the file was generated at 21 instead of 23.

Now i guess that showing the timezone would be even better. Unfortunately QDateTime does not have timezone support, so not sure there's much more we can do here.
Comment 4 Luigi Toscano 2014-08-11 23:17:37 UTC
If I read the code correcly, the core function which reads the date is Poppler::convertDate here:
http://cgit.freedesktop.org/poppler/poppler/tree/qt4/src/poppler-document.cc#n653
The date is always UTC, we could at least show that it's UTC in the information dialog. For the (not so far) future, Qt5 QDateTime has timezone support, a proper fix (show the original timezone too) would be possible. 
For the reasons stated above I would leave this bug CONFIRMED.
Comment 5 Benoit Ozell 2016-02-04 22:50:19 UTC
Okular is great but would be even better if this bug was corrected.
Comment 6 Justin Zobel 2021-03-09 23:59:19 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 7 Benoit Ozell 2021-03-29 21:40:55 UTC
Today, I created a PDF (unsing pdflatex) and the time displayed by okular in the properties for this file is now correctly displayed in UTC (the CreationDate in this file using my time zone corresponds correctly to the string displayed by okular using UTC).