[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs-25 ed1b2de: Fix NNTP NEWGROUPS off-by-a-few-hours bug
From: |
Katsumi Yamaoka |
Subject: |
Re: emacs-25 ed1b2de: Fix NNTP NEWGROUPS off-by-a-few-hours bug |
Date: |
Thu, 14 Jan 2016 18:47:03 +0900 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (i686-pc-cygwin) |
Hi,
On Wed, 13 Jan 2016 16:29:37 +0000, Paul Eggert <address@hidden> wrote:
> branch: emacs-25
> commit ed1b2de50ae87d8b2f9882be7576fbe5097df65b
> Author: Paul Eggert <address@hidden>
> Commit: Paul Eggert <address@hidden>
> Fix NNTP NEWGROUPS off-by-a-few-hours bug
> * lisp/gnus/nntp.el (nntp-request-newgroups): Format string
> in Universal Time, since we’re telling the server “GMT”.
> ---
> lisp/gnus/nntp.el | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el
> index 0e10dfd..0006ef9 100644
> --- a/lisp/gnus/nntp.el
> +++ b/lisp/gnus/nntp.el
> @@ -1130,7 +1130,7 @@ command whose response triggered the error."
> (prog1
> (nntp-send-command
> "^\\.\r?\n" "NEWGROUPS"
> - (format-time-string "%y%m%d %H%M%S" time)
> + (format-time-string "%y%m%d %H%M%S" time t)
> "GMT")
> (nntp-decode-text))))))
Is this really a fix? In Japan (i.e., +0900) this doesn't seem
to pass the correct GMT date to a server:
(defun nntp-request-newgroups-test (date)
(let* ((time (date-to-time date))
(ls (- (cadr time) (nth 8 (decode-time time)))))
(cond ((< ls 0)
(setcar time (1- (car time)))
(setcar (cdr time) (+ ls 65536)))
((>= ls 65536)
(setcar time (1+ (car time)))
(setcar (cdr time) (- ls 65536)))
(t
(setcar (cdr time) ls)))
(format-time-string "%y%m%d %H%M%S" time t)))
(let ((date (message-make-date)))
(list date
(nntp-request-newgroups-test date)))
=> ("Thu, 14 Jan 2016 18:44:10 +0900" "160114 004410")
If removing the last `t', it returns:
=> ("Thu, 14 Jan 2016 18:44:18 +0900" "160114 094418")
See also `gnus-ask-server-for-new-groups'.
Regards,
- Re: emacs-25 ed1b2de: Fix NNTP NEWGROUPS off-by-a-few-hours bug,
Katsumi Yamaoka <=