From e0acd8a15a40cb15bd5c5c26c5a345900762c2f1 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sat, 16 Apr 2016 11:33:28 +0200 Subject: [PATCH] Fix "Invalid time zone specification" error * lisp/org.el (org-timestamp-change): Correctly handle `encode-time' parameters. Suggested-by: Derek Feichtinger Reported-by: Eric Abrahamsen --- lisp/org.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 50db0628a..7129cc54f 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -18034,13 +18034,14 @@ When SUPPRESS-TMP-DELAY is non-nil, suppress delays like \"--2d\"." (setcar (cdr time0) (+ (nth 1 time0) (if (> n 0) (- rem) (- dm rem)))))) (setq time - (encode-time (or (car time0) 0) - (+ (if (eq org-ts-what 'minute) n 0) (nth 1 time0)) - (+ (if (eq org-ts-what 'hour) n 0) (nth 2 time0)) - (+ (if (eq org-ts-what 'day) n 0) (nth 3 time0)) - (+ (if (eq org-ts-what 'month) n 0) (nth 4 time0)) - (+ (if (eq org-ts-what 'year) n 0) (nth 5 time0)) - (nthcdr 6 time0))) + (apply #'encode-time + (or (car time0) 0) + (+ (if (eq org-ts-what 'minute) n 0) (nth 1 time0)) + (+ (if (eq org-ts-what 'hour) n 0) (nth 2 time0)) + (+ (if (eq org-ts-what 'day) n 0) (nth 3 time0)) + (+ (if (eq org-ts-what 'month) n 0) (nth 4 time0)) + (+ (if (eq org-ts-what 'year) n 0) (nth 5 time0)) + (nthcdr 6 time0))) (when (and (member org-ts-what '(hour minute)) extra (string-match "-\\([012][0-9]\\):\\([0-5][0-9]\\)" extra))