Convert creation/modification dates to UTC (fixes #155) #168

Merged
josch merged 1 commit from phmccarty/img2pdf:utc-timestamps into main 2023-06-11 05:30:53 +00:00

1 commit

Author SHA1 Message Date
81502f21af Convert creation/modification dates to UTC (fixes #155)
Ensure that timezones are correctly interpreted in the input by calling
`.astimezone()` as appropriate on datetime objects, and store the
resulting date fields as UTC.

One could argue that datetimes in the local timezone be stored in the
PDF, but then the date string handling becomes more complicated; the PDF
and XMP date specs both use the `Z` suffix to indicate UTC time, but
other +/- offsets require different syntax between the two specs.
2023-06-10 17:53:03 -07:00