Mercurial > emacs
changeset 104802:0b94fa0fdedb
(gnus-float-time): New function.
(gnus-user-date): Use gnus-float-time.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Wed, 02 Sep 2009 03:27:14 +0000 |
parents | a55980608639 |
children | 2fb28585eb6b |
files | lisp/gnus/gnus-util.el |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/gnus/gnus-util.el Wed Sep 02 03:26:30 2009 +0000 +++ b/lisp/gnus/gnus-util.el Wed Sep 02 03:27:14 2009 +0000 @@ -285,6 +285,12 @@ (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 @@ 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))