[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gropdf (1.23.0): incorrect CreationDate/ModDate
From: |
Christof Meerwald |
Subject: |
Re: gropdf (1.23.0): incorrect CreationDate/ModDate |
Date: |
Fri, 5 Apr 2024 14:27:15 +0200 |
On Thu, Apr 04, 2024 at 06:21:37PM -0500, G. Branden Robinson wrote:
> 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.
Oh yes, it's a Debian/Ubuntu groff 1.23.0 (didn't think it had any
additional patches).
>
> $ ~/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')
so these should actually be
D:20010909014640Z00'00'
so that's a third bug then.
> > 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.
I am attaching a patch that should address all three bugs.
Christof
--
https://cmeerw.org sip:cmeerw at cmeerw.org
mailto:cmeerw at cmeerw.org xmpp:cmeerw at cmeerw.org
gropdf.diff
Description: Text Data