Use gnus-float-time rather than time-to-seconds.
authorGlenn Morris <rgm@gnu.org>
Wed, 2 Sep 2009 03:29:49 +0000 (03:29 +0000)
committerGlenn Morris <rgm@gnu.org>
Wed, 2 Sep 2009 03:29:49 +0000 (03:29 +0000)
lisp/gnus/ChangeLog
lisp/gnus/gnus-delay.el
lisp/gnus/gnus-sum.el
lisp/gnus/nnspool.el

index 08f9fa2..c69d4d8 100644 (file)
@@ -1,5 +1,13 @@
 2009-09-02  Glenn Morris  <rgm@gnu.org>
 
+       * gnus-util.el (gnus-float-time): New function.
+       * gnus-delay.el (gnus-delay-article):
+       * gnus-sum.el (gnus-thread-latest-date):
+       * gnus-util.el (gnus-user-date): Use gnus-float-time.
+       * nnspool.el (nnspool-request-newgroups):
+       Use gnus-float-time rather than time-to-seconds.
+       * ecomplete.el (ecomplete-add-item): In Emacs, use float-time.
+
        * gnus-art.el (gnus-signature-face, gnus-header-from-face)
        (gnus-header-subject-face, gnus-header-newsgroups-face)
        (gnus-header-name-face, gnus-header-content-face):
index 1448031..bd781f9 100644 (file)
@@ -1,6 +1,7 @@
 ;;; gnus-delay.el --- Delayed posting of articles
 
-;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+;;   Free Software Foundation, Inc.
 
 ;; Author: Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 ;; Keywords: mail, news, extensions
@@ -101,10 +102,10 @@ DELAY is a string, giving the length of the time.  Possible values are:
           (aset deadline 1 minute)
           (aset deadline 2 hour)
           ;; Convert to seconds.
-          (setq deadline (time-to-seconds (apply 'encode-time
+          (setq deadline (gnus-float-time (apply 'encode-time
                                                  (append deadline nil))))
           ;; If this time has passed already, add a day.
-          (when (< deadline (time-to-seconds (current-time)))
+          (when (< deadline (gnus-float-time (current-time)))
             (setq deadline (+ 3600 deadline))) ;3600 secs/day
           ;; Convert seconds to date header.
           (setq deadline (message-make-date
@@ -127,7 +128,7 @@ DELAY is a string, giving the length of the time.  Possible values are:
                 (t
                  (setq delay (* num 60))))
           (setq deadline (message-make-date
-                          (seconds-to-time (+ (time-to-seconds (current-time))
+                          (seconds-to-time (+ (gnus-float-time (current-time))
                                               delay)))))
          (t (error "Malformed delay `%s'" delay)))
     (message-add-header (format "%s: %s" gnus-delay-header deadline)))
index 7f460ac..b1fa525 100644 (file)
@@ -5002,7 +5002,7 @@ Unscored articles will be counted as having a score of zero."
            (lambda (header)
              (setq previous-time
                    (condition-case ()
-                       (time-to-seconds (mail-header-parse-date
+                       (gnus-float-time (mail-header-parse-date
                                          (mail-header-date header)))
                      (error previous-time))))
            (sort
index 38dfd60..6f8330f 100644 (file)
@@ -1,7 +1,8 @@
 ;;; nnspool.el --- spool access for GNU Emacs
 
 ;; Copyright (C) 1988, 1989, 1990, 1993, 1994, 1995, 1996, 1997, 1998,
-;;   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;;   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+;;   Free Software Foundation, Inc.
 
 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
 ;;     Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -288,7 +289,8 @@ there.")
        (while (and (not (looking-at
                          "\\([^ ]+\\) +\\([0-9]+\\)[0-9][0-9][0-9] "))
                    (zerop (forward-line -1))))
-       (let ((seconds (time-to-seconds (date-to-time date)))
+       ;; We require nnheader which requires gnus-util.
+       (let ((seconds (gnus-float-time (date-to-time date)))
              groups)
          ;; Go through lines and add the latest groups to a list.
          (while (and (looking-at "\\([^ ]+\\) +[0-9]+ ")