flatpak-external-data-checker icon indicating copy to clipboard operation
flatpak-external-data-checker copied to clipboard

Timezone location in HTTP `Date` header is unsupported

Open gasinvein opened this issue 4 years ago • 2 comments

E.g. Fri, 17 Nov 2017 13:46:28 Asia/Shanghai can't be parsed and raises ValueError. And seems like there is no way to parse timezone database location name with datetime.datetime. Does anyone know a library suitable for parsing HTTP Date header?

gasinvein avatar Jul 24 '21 17:07 gasinvein

According to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Date and other sources like https://httpwg.org/specs/rfc7231.html#header.date that header is illegal. In that format (IMF-fixdate in the language of RFC 7231) the zone field is the literal string GMT. So it may be hard to find an off-the-shelf parser for this illegal format. :-)

Where is this seen?

wjt avatar Aug 16 '21 20:08 wjt

Where is this seen?

We're getting it from here.

gasinvein avatar Aug 17 '21 10:08 gasinvein