GNU bug report logs - #44566
27.1; time bug at Gnus

Previous Next

Package: emacs;

Reported by: 황병희 <soyeomul <at> doraji.xyz>

Date: Wed, 11 Nov 2020 02:57:01 UTC

Severity: normal

Tags: moreinfo

Found in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #70 received at 44566 <at> debbugs.gnu.org (full text, mbox):

From: Adam Sjøgren <asjo <at> koldfront.dk>
To: 44566 <at> debbugs.gnu.org
Subject: Re: bug#44566: 27.1; time bug at Gnus
Date: Wed, 11 Nov 2020 14:28:49 +0100
Adam writes:

> the nntp-server in question is one I have implemented, and I think
> it's more likely that my nntp-server doesn't handle timezones/follow
> the spec correctly than Gnus being at fault.

Specifically my code is using Data.Time.Format¹s defaultTimeLocale and
rfc822DateFormat, which doesn't seem to use the restricted list of
timezones defined in rfc(2)822:

  $ ghci
  GHCi, version 8.8.4: https://www.haskell.org/ghc/  :? for help
  Prelude> import Data.Time.LocalTime
  Prelude Data.Time.LocalTime> import Data.Time.Format
  Prelude Data.Time.LocalTime Data.Time.Format> now <- getZonedTime
  Prelude Data.Time.LocalTime Data.Time.Format> formatTime defaultTimeLocale rfc822DateFormat now
  "Wed, 11 Nov 2020 14:23:39 CET"

Despite the documentation saying:

   defaultTimeLocale :: TimeLocale

     Locale representing American usage.

     knownTimeZones contains only the ten time-zones mentioned in RFC 802
     sec. 5: "UT", "GMT", "EST", "EDT", "CST", "CDT", "MST", "MDT", "PST",
     "PDT". Note that the parsing functions will regardless parse "UTC",
     single-letter military time-zones, and +HHMM format.


¹ https://hackage.haskell.org/package/time-1.9.3/docs/Data-Time-Format.html#g:3




This bug report was last modified 4 years and 218 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.