Procházet zdrojové kódy

org-table: use HH:MM:SS as the standard display of durations.

(org-table-time-seconds-to-string): Uniformize the display of
durations, always return HH:MM:SS.  Also display negative time
correctly.
Bastien Guerry před 13 roky
rodič
revize
ecd2a41ecc
1 změnil soubory, kde provedl 1 přidání a 3 odebrání
  1. 1 3
      lisp/org-table.el

+ 1 - 3
lisp/org-table.el

@@ -3230,9 +3230,7 @@ S must be a string matching either -?HH:MM:SS or -?HH:MM."
 
 (defun org-table-time-seconds-to-string (secs)
   "Convert a number of seconds to a time string."
-  (cond ((>= secs 3600) (org-format-seconds "%h:%.2m:%.2s" secs))
-	((>= secs 60) (org-format-seconds "%m:%.2s" secs))
-	(t (org-format-seconds "%s" secs))))
+  (org-format-seconds "%.2h:%.2m:%.2s" secs))
 
 (defun org-table-fedit-convert-buffer (function)
   "Convert all references in this buffer, using FUNCTION."