diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2018-08-25 19:03:26 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2018-08-25 19:57:01 -0700 |
commit | 0edf60583245cc6f3fd53ddae2f21748a4a1b239 (patch) | |
tree | c18b6cdd83230d9d1f248189dbd55c431c4f8747 /lisp/calendar/time-date.el | |
parent | 2daf8b7e55698cc58f9b0a82aac591f957041cc6 (diff) | |
download | emacs-0edf60583245cc6f3fd53ddae2f21748a4a1b239.tar.gz |
Improve format-seconds accuracy
* doc/lispref/os.texi (Time Parsing): It works with bignums.
* lisp/calendar/time-date.el (format-seconds):
Take the floor so that the resulting arithmetic is exact.
Diffstat (limited to 'lisp/calendar/time-date.el')
-rw-r--r-- | lisp/calendar/time-date.el | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el index 467915e3d9f..74c607ccb68 100644 --- a/lisp/calendar/time-date.el +++ b/lisp/calendar/time-date.el @@ -303,6 +303,7 @@ is output until the first non-zero unit is encountered." (push match usedunits))) (and zeroflag larger (error "Units are not in decreasing order of size")) + (setq seconds (floor seconds)) (dolist (u units) (setq spec (car u) name (cadr u) |