Browse Source

org.el (org-minutes-to-clocksum-string): Round fractions of minutes

* org.el (org-minutes-to-clocksum-string): Round fractions of
minutes.

When adding efforts values in the column view, "0:20" will first be
converted as 0.333333333 hour.  When converting the final sum, we
now round the final sum of minutes (e.g. 99.999999999) to get the
correct hour displa (i.e. 1:40 instead of 1:39).
Bastien Guerry 4 years ago
parent
commit
872e3736d7
1 changed files with 3 additions and 1 deletions
  1. 3 1
      lisp/org.el

+ 3 - 1
lisp/org.el

@@ -17463,7 +17463,9 @@ The format is determined by `org-time-clocksum-format',
 `org-time-clocksum-use-fractional' and
 `org-time-clocksum-fractional-format' and
 `org-time-clocksum-use-effort-durations'."
-  (let ((clocksum "") h d w mo y fmt n)
+  (let ((clocksum "")
+	(m (round m)) ; Don't allow fractions of minutes
+	h d w mo y fmt n)
     (setq h (if org-time-clocksum-use-effort-durations
 		(cdr (assoc "h" org-effort-durations)) 60)
 	  d (if org-time-clocksum-use-effort-durations