diff options
| author | Glenn Morris | 2009-09-02 03:27:14 +0000 |
|---|---|---|
| committer | Glenn Morris | 2009-09-02 03:27:14 +0000 |
| commit | feefd9f3ddfd06ecadec89580aab9c247c9cfe3d (patch) | |
| tree | f33862767f6b419e205f980782a02e1a92851d60 | |
| parent | c62cc3ac0c54f5c0fcef294a4f80cc8ce57bd00d (diff) | |
| download | emacs-feefd9f3ddfd06ecadec89580aab9c247c9cfe3d.tar.gz emacs-feefd9f3ddfd06ecadec89580aab9c247c9cfe3d.zip | |
(gnus-float-time): New function.
(gnus-user-date): Use gnus-float-time.
| -rw-r--r-- | lisp/gnus/gnus-util.el | 10 |
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.") | |||
| 443 | Returns \" ? \" if there's bad input or if an other error occurs. | 449 | Returns \" ? \" if there's bad input or if an other error occurs. |
| 444 | Input should look like this: \"Sun, 14 Oct 2001 13:34:39 +0200\"." | 450 | Input 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)) |