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).
This commit is contained in:
Bastien Guerry 2013-04-09 16:15:17 +02:00
parent 33f800ccd2
commit 872e3736d7
1 changed files with 3 additions and 1 deletions

View File

@ -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