summaryrefslogtreecommitdiff
path: root/lisp/gnus/nntp.el
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-07-23 10:08:15 +0000
committerGerd Moellmann <gerd@gnu.org>2001-07-23 10:08:15 +0000
commit3b0dbc912b2a5ca4a5cccb6c2c343e4f11b39096 (patch)
treee52ae7389979e1c72e52e9a0f765243c3cf66e05 /lisp/gnus/nntp.el
parentf111f09d776ecf745f948dc74255939d8aa37b25 (diff)
downloademacs-3b0dbc912b2a5ca4a5cccb6c2c343e4f11b39096.tar.gz
(nntp-request-newgroups): Use UTC date for NEWGROUPS
command.
Diffstat (limited to 'lisp/gnus/nntp.el')
-rw-r--r--lisp/gnus/nntp.el23
1 files changed, 17 insertions, 6 deletions
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el
index 52322137052..803fd975e5e 100644
--- a/lisp/gnus/nntp.el
+++ b/lisp/gnus/nntp.el
@@ -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 @@ noticing asynchronous data.")
(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)