From 304e5d33f529772a1b8d3db033f6666ea4ba474d Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Tue, 22 Sep 2015 21:15:09 +0200 Subject: [PATCH] Fix end time shifting past midnight * lisp/org.el (org-modify-ts-extra): Properly wrap time after 23:59. This can still generate wrong timestamps, e.g. <2015-09-21 Mo 23:00-23:55> => <2015-09-21 Mo 23:05-00:00> but at least, the error is predictable. Reported-by: Detlef Steuer --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 004e809af..b1ce57895 100755 --- a/lisp/org.el +++ b/lisp/org.el @@ -18111,7 +18111,7 @@ When SUPPRESS-TMP-DELAY is non-nil, suppress delays like \"--2d\"." (setq m (+ m n))) (if (< m 0) (setq m (+ m 60) h (1- h))) (if (> m 59) (setq m (- m 60) h (1+ h))) - (setq h (min 24 (max 0 h))) + (setq h (mod h 24)) (setq ng 1 new (format "-%02d:%02d" h m))) ((org-pos-in-match-range pos 6) (setq ng 6 new (car (rassoc (+ n (cdr (assoc (match-string 6 s) idx))) idx))))