> > > > Example header.
> > > >
> > > > [...]
> > > > Date: Fri, 1 Jan 2021 03:21:34 -0800 (PST) <----
> > > > User-Agent: G2/1.0
> > > > MIME-Version: 1.0
> > > > Message-ID: <
3be7b521-45b4-4b71...@googlegroups.com>
> > > > [...]
> > > > Injection-Date: Fri, 01 Jan 2021 11:21:35 +0000 <----
>
> [...]
> The 'Injection-Date' header is indeed reported in UTC, but that does
> not mean that the poster lives in the UTC timezone. My 'Date' header is
> also in UTC ('GMT'), but I live in The Netherlands, which (now, no DST)
> is UTC+01:00.
>
> All in all, I think that as - as I described before - 'Date' and
> 'Injection-Date' contain the exact same time, it looks like Gravity can
> not handle the syntactically correct 'Date' header. That's rather
> strange, because using a timezone code like '(PST)' is long standing
> common practice.
>
> Maybe Michael can see if there's anything wrong with the 'Date' header
> (which I don't see).
No, the syntax of the field looks valid.
Sytax definitions quoted from [1]:
|
| date-time = [ day-of-week "," ] date time [CFWS]
| day-of-week = ([FWS] day-name) / obs-day-of-week
| date = day month year
| time = time-of-day zone
| time-of-day = hour ":" minute [ ":" second ]
| zone = (FWS ( "+" / "-" ) 4DIGIT) / obs-zone
The date with the optional <day-of-week> and the time with the optional
<second> are the variants used by most posting/injecting agents.
Date: Fri, 1 Jan 2021 03:21:34 -0800 (PST)
The comment "(PST)" matches the optional <CFWS> at the end of
<date-time>. Therefore it is allowed at this place but has no
semantical meaning, as Adam has already written.
These two variants for more brevity should be correct syntax too:
Date: 1 Jan 2021 03:21:34 -0800
Date: 1 Jan 2021 03:21 -0800
flnews has used the first one until version 0.12 and it was reported
that this breaks the parser of PhoNews (<day-of-week> is now generated
for better compatibility).
The following variant uses "PST" syntactically as <zone>:
Date: Fri, 1 Jan 2021 03:21:34 PST
"PST" matches <obs-zone> [2]:
|
| [...] PST is semantically equivalent to -0800
RFC 5322 says in [3] that generating obsolete syntax is no longer
allowed. But a conformant parser must still understand it:
|
| [...] Though these syntactic forms MUST NOT be generated according
| to the grammar in section 3, they MUST be accepted and parsed by a
| conformant receiver.
RFC 5536 explicitly specifies that "GMT" must be accepted for
<obs-zone> [4], but this only repeats what is already specified
by the reference to RFC 5322 (for "GMT", "PST" and some others).
My conclusion:
In theory Gravity should understand all variants listed above.
Otherwise this should be reported as a bug.
_____________
[1] <
https://tools.ietf.org/html/rfc5322#section-3.3>
[2] <
https://tools.ietf.org/html/rfc5322#section-4.3>
[3] <
https://tools.ietf.org/html/rfc5322#section-4>
[4] <
https://tools.ietf.org/html/rfc5536#section-3.1.1>