2001-07-19 Katsumi Yamaoka <yamaoka@jpl.org>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 20 Jul 2001 19:08:22 +0000 (19:08 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 20 Jul 2001 19:08:22 +0000 (19:08 +0000)
* nntp.el (nntp-request-newgroups): Use UTC date for NEWGROUPS
command.

* gnus-start.el (gnus-find-new-newsgroups): Use
`message-make-date' instead of `current-time-string'.
(gnus-ask-server-for-new-groups): Ditto.
(gnus-check-first-time-used): Ditto.

lisp/ChangeLog
lisp/gnus-start.el
lisp/nntp.el

index e5aeace..8671442 100644 (file)
@@ -1,3 +1,13 @@
+2001-07-19  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * nntp.el (nntp-request-newgroups): Use UTC date for NEWGROUPS
+       command.
+
+       * gnus-start.el (gnus-find-new-newsgroups): Use
+       `message-make-date' instead of `current-time-string'.
+       (gnus-ask-server-for-new-groups): Ditto.
+       (gnus-check-first-time-used): Ditto.
+
 2001-07-20 11:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * gnus-score.el (gnus-home-score-file): nnheader-translate-file-chars.
index 7402219..ddc2dde 100644 (file)
@@ -1018,7 +1018,7 @@ for new groups, and subscribe the new groups as zombies."
          (gnus-message 5 "Looking for new newsgroups...")
          (unless gnus-have-read-active-file
            (gnus-read-active-file))
-         (setq gnus-newsrc-last-checked-date (current-time-string))
+         (setq gnus-newsrc-last-checked-date (message-make-date))
          (unless gnus-killed-hashtb
            (gnus-make-hashtable-from-killed))
          ;; Go though every newsgroup in `gnus-active-hashtb' and compare
@@ -1083,7 +1083,8 @@ for new groups, and subscribe the new groups as zombies."
       (and regs (cdar regs))))))
 
 (defun gnus-ask-server-for-new-groups ()
-  (let* ((date (or gnus-newsrc-last-checked-date (current-time-string)))
+  (let* ((new-date (message-make-date))
+        (date (or gnus-newsrc-last-checked-date new-date))
         (methods (cons gnus-select-method
                        (nconc
                         (when (gnus-archive-server-wanted-p)
@@ -1093,7 +1094,6 @@ for new groups, and subscribe the new groups as zombies."
                               gnus-check-new-newsgroups)
                          gnus-secondary-select-methods))))
         (groups 0)
-        (new-date (current-time-string))
         group new-newsgroups got-new method hashtb
         gnus-override-subscribe-method)
     (unless gnus-killed-hashtb
@@ -1169,7 +1169,7 @@ for new groups, and subscribe the new groups as zombies."
     (unless (gnus-read-active-file-p)
       (let ((gnus-read-active-file t))
        (gnus-read-active-file)))
-    (setq gnus-newsrc-last-checked-date (current-time-string))
+    (setq gnus-newsrc-last-checked-date (message-make-date))
     ;; Subscribe to the default newsgroups.
     (let ((groups (or gnus-default-subscribed-newsgroups
                      gnus-backup-default-subscribed-newsgroups))
index a3efe54..1cf3aee 100644 (file)
@@ -817,11 +817,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)