From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: emacs-25 ed1b2de: Fix NNTP NEWGROUPS off-by-a-few-hours bug Date: Thu, 14 Jan 2016 11:15:13 +0100 Message-ID: References: <20160113162937.24105.71354@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1452766550 11553 80.91.229.3 (14 Jan 2016 10:15:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Jan 2016 10:15:50 +0000 (UTC) Cc: Paul Eggert , emacs-devel@gnu.org To: Katsumi Yamaoka Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 14 11:15:40 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aJewN-0004Zc-Ep for ged-emacs-devel@m.gmane.org; Thu, 14 Jan 2016 11:15:39 +0100 Original-Received: from localhost ([::1]:41228 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJewM-0003RM-JA for ged-emacs-devel@m.gmane.org; Thu, 14 Jan 2016 05:15:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54022) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJew3-0003N0-66 for emacs-devel@gnu.org; Thu, 14 Jan 2016 05:15:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJevz-0005qp-RN for emacs-devel@gnu.org; Thu, 14 Jan 2016 05:15:18 -0500 Original-Received: from mx2.suse.de ([195.135.220.15]:46125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJevz-0005qf-Kv for emacs-devel@gnu.org; Thu, 14 Jan 2016 05:15:15 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Original-Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 4DF21AB9D; Thu, 14 Jan 2016 10:15:12 +0000 (UTC) X-Yow: Wow! Look!! A stray meatball!! Let's interview it! In-Reply-To: (Katsumi Yamaoka's message of "Thu, 14 Jan 2016 18:47:03 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:198125 Archived-At: Katsumi Yamaoka 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, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."