Hi Christof, Thanks for the report.
At 2024-04-04T23:44:25+0200, Christof Meerwald wrote: > There appear to be two bugs in how gropdf (from 1.23.0) writes the > CreationDate/ModDate. To demonstrate I am running > > while sleep 60; do date; echo "" | > groff -Z -Tpdf | gropdf | fgrep -a Date; done The body of this loop can be simplified. echo | groff -Tpdf | grep -a Date I can't reproduce this problem with groff 1.23.0. $ ~/groff-stable/bin/groff --version | head -n 1 GNU groff version 1.23.0 $ echo | SOURCE_DATE_EPOCH=1000000000 ~/groff-stable/bin/groff -Tpdf \ | grep -a Date 5 0 obj << /CreationDate (D:20010908204640-05'00') /ModDate (D:20010908204640-05'00') > I don't think there should be a "+" sign in the last component of the > dates, it should probably be > > D:20240404233357+02'00' > > instead of > > D:20240404233357+02'+00' I agree that that looks weird. (On the other hand, ASN.1 date syntax does not come naturally to me.) And I _can_ reproduce it with groff Git. $ ~/groff-HEAD/bin/groff --version | head -n 1 GNU groff version 1.23.0.1094-94002 $ echo | SOURCE_DATE_EPOCH=1000000000 ~/groff-HEAD/bin/groff -Tpdf | grep -a Date 5 0 obj << /CreationDate (D:20010909014640+00'+00') /ModDate (D:20010909014640+00'+00') > And I am pretty sure we didn't just switch to summer time at around > 23:32 here. > > gropdf 1.22.4 doesn't appear to have these bugs. I infer that you are using a Debian-derived groff package carrying a patch by Colin Watson that he committed to groff Git shortly after the 1.23.0 release. https://git.savannah.gnu.org/cgit/groff.git/commit/?id=d7bbfb04ea25a82a8597cdef6ebb391cb78ab47c Colin, can you double-check whether you're producing a date format conformant with ยง7.9.4 of ISO 32000? I'm attaching the relevant pages of Adobe's gratis version of the standard. Regards, Branden
pdf_date_format.pdf
Description: pdf_date_format.pdf
signature.asc
Description: PGP signature