summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2009-09-02 03:27:14 +0000
committerGlenn Morris <rgm@gnu.org>2009-09-02 03:27:14 +0000
commitfeefd9f3ddfd06ecadec89580aab9c247c9cfe3d (patch)
treef33862767f6b419e205f980782a02e1a92851d60 /lisp
parentc62cc3ac0c54f5c0fcef294a4f80cc8ce57bd00d (diff)
downloademacs-feefd9f3ddfd06ecadec89580aab9c247c9cfe3d.tar.gz
(gnus-float-time): New function.
(gnus-user-date): Use gnus-float-time.
Diffstat (limited to 'lisp')
-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."
(and (= (car fdate) (car date))
(> (nth 1 fdate) (nth 1 date))))))
+(defun gnus-float-time (time)
+ "Convert time value TIME to a floating point number."
+ (if (featurep 'xemacs)
+ (time-to-seconds time)
+ (float-time time)))
+
;;; Keymap macros.
(defmacro gnus-local-set-keys (&rest plist)
@@ -443,8 +449,8 @@ respectively.")
Returns \" ? \" if there's bad input or if an other error occurs.
Input should look like this: \"Sun, 14 Oct 2001 13:34:39 +0200\"."
(condition-case ()
- (let* ((messy-date (time-to-seconds (safe-date-to-time messy-date)))
- (now (time-to-seconds (current-time)))
+ (let* ((messy-date (gnus-float-time (safe-date-to-time messy-date)))
+ (now (gnus-float-time (current-time)))
;;If we don't find something suitable we'll use this one
(my-format "%b %d '%y"))
(let* ((difference (- now messy-date))