From 244aaa3d7287ec4e2389decef1714cf6fd3889a8 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Wed, 3 Jul 2013 10:18:22 +0200 Subject: [PATCH] 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. --- lisp/org-table.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-table.el b/lisp/org-table.el index 7b91f3670..c5a3aca39 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -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"