summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2015-09-22 21:15:09 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2015-09-22 21:15:09 +0200
commit304e5d33f529772a1b8d3db033f6666ea4ba474d (patch)
treecec1219eb0c602c590d9c71d8a033f8fca6c4bb1
parentcc0d491739b6c81282dfd86330f646d3e4e92b60 (diff)
downloadorg-mode-304e5d33f529772a1b8d3db033f6666ea4ba474d.tar.gz
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 <detlef.steuer@gmx.de> <http://permalink.gmane.org/gmane.emacs.orgmode/101350>
-rwxr-xr-xlisp/org.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 004e809..b1ce578 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))))