org-table.el (org-table-sum): Fix rounding error when summing times

* org-table.el (org-table-sum): Fix rounding error when
summing times.

Thanks to Paul Stansell for reporting this and to Nick Dokos for
providing the fix.

See http://mid.gmane.org/87ppv2atvf.fsf%40gmail.com for the
discussion of this bug.
This commit is contained in:
Bastien Guerry 2013-07-03 10:18:22 +02:00
parent 4eddd17ba7
commit 244aaa3d72
1 changed files with 1 additions and 1 deletions

View File

@ -2099,7 +2099,7 @@ If NLAST is a number, only the NLAST fields will actually be summed."
h (floor (/ diff 3600)) diff (mod diff 3600)
m (floor (/ diff 60)) diff (mod diff 60)
s diff)
(format "%d:%02d:%02d" h m s))))
(format "%.0f:%02.0f:%02.0f" h m s))))
(kill-new sres)
(if (org-called-interactively-p 'interactive)
(message "%s"