[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: |
Andreas Schwab |
Subject: |
Re: emacs-25 ed1b2de: Fix NNTP NEWGROUPS off-by-a-few-hours bug |
Date: |
Thu, 14 Jan 2016 11:15:13 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Katsumi Yamaoka <address@hidden> writes:
> 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")
The manual timezone adjustment needs to be removed as well.
Andreas.
--
Andreas Schwab, SUSE Labs, address@hidden
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."