Mercurial > emacs
changeset 38525:f5c857b7ecf8
(nntp-request-newgroups): Use UTC date for NEWGROUPS
command.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 23 Jul 2001 10:08:15 +0000 |
parents | 2d351e49dc96 |
children | 98b3bb015deb |
files | lisp/gnus/nntp.el |
diffstat | 1 files changed, 17 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/gnus/nntp.el Mon Jul 23 09:57:37 2001 +0000 +++ b/lisp/gnus/nntp.el Mon Jul 23 10:08:15 2001 +0000 @@ -1,6 +1,6 @@ ;;; nntp.el --- nntp access for Gnus ;; Copyright (C) 1987, 1988, 1989, 1990, 1992, 1993, 1994, 1995, 1996, -;; 1997, 1998, 2000 +;; 1997, 1998, 2000, 2001 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> @@ -752,11 +752,22 @@ (nntp-possibly-change-group nil server) (save-excursion (set-buffer nntp-server-buffer) - (prog1 - (nntp-send-command - "^\\.\r?\n" "NEWGROUPS" - (format-time-string "%y%m%d %H%M%S" (date-to-time date))) - (nntp-decode-text)))) + (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))) + (prog1 + (nntp-send-command + "^\\.\r?\n" "NEWGROUPS" + (format-time-string "%y%m%d %H%M%S" time) + "GMT") + (nntp-decode-text))))) (deffoo nntp-request-post (&optional server) (nntp-possibly-change-group nil server)