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:
parent
4eddd17ba7
commit
244aaa3d72
|
@ -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)
|
h (floor (/ diff 3600)) diff (mod diff 3600)
|
||||||
m (floor (/ diff 60)) diff (mod diff 60)
|
m (floor (/ diff 60)) diff (mod diff 60)
|
||||||
s diff)
|
s diff)
|
||||||
(format "%d:%02d:%02d" h m s))))
|
(format "%.0f:%02.0f:%02.0f" h m s))))
|
||||||
(kill-new sres)
|
(kill-new sres)
|
||||||
(if (org-called-interactively-p 'interactive)
|
(if (org-called-interactively-p 'interactive)
|
||||||
(message "%s"
|
(message "%s"
|
||||||
|
|
Loading…
Reference in New Issue