aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/gnus/gnus-util.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index 3827bc17c5d..788fa16cb0d 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -285,6 +285,12 @@ Symbols are also allowed; their print names are used instead."
285 (and (= (car fdate) (car date)) 285 (and (= (car fdate) (car date))
286 (> (nth 1 fdate) (nth 1 date)))))) 286 (> (nth 1 fdate) (nth 1 date))))))
287 287
288(defun gnus-float-time (time)
289 "Convert time value TIME to a floating point number."
290 (if (featurep 'xemacs)
291 (time-to-seconds time)
292 (float-time time)))
293
288;;; Keymap macros. 294;;; Keymap macros.
289 295
290(defmacro gnus-local-set-keys (&rest plist) 296(defmacro gnus-local-set-keys (&rest plist)
@@ -443,8 +449,8 @@ respectively.")
443Returns \" ? \" if there's bad input or if an other error occurs. 449Returns \" ? \" if there's bad input or if an other error occurs.
444Input should look like this: \"Sun, 14 Oct 2001 13:34:39 +0200\"." 450Input should look like this: \"Sun, 14 Oct 2001 13:34:39 +0200\"."
445 (condition-case () 451 (condition-case ()
446 (let* ((messy-date (time-to-seconds (safe-date-to-time messy-date))) 452 (let* ((messy-date (gnus-float-time (safe-date-to-time messy-date)))
447 (now (time-to-seconds (current-time))) 453 (now (gnus-float-time (current-time)))
448 ;;If we don't find something suitable we'll use this one 454 ;;If we don't find something suitable we'll use this one
449 (my-format "%b %d '%y")) 455 (my-format "%b %d '%y"))
450 (let* ((difference (- now messy-date)) 456 (let* ((difference (- now messy-date))