emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Problem with org-timestamp-up and timezones


From: Nicolas Goaziou
Subject: Re: [O] Problem with org-timestamp-up and timezones
Date: Sat, 16 Apr 2016 11:43:57 +0200

Hello,

Derek Feichtinger <address@hidden> writes:

> The problematic statement is in org.el, defun org-timestamp-change, where
> the argument list to encode time evaluates to something like
>
> (encode-time 0 0 0 30 11 2013 '(nil nil nil))
>
> i.e. the 7th argument is a list, while the function would be ok with getting
> the three nil values not packed into a list. So, just introducing an "apply"
> in front fixes this for now.
>
> So from the following code in org-timestamp-change
>
>    ...
>       (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)))
>    ...
>
> I just modify to the following
>
>    ...
>       (setq time
>           (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)))
>    ...
>
>
> Afterwards the time shifts on the clock lines works fine, again. But I do
> not know whether this fixes all cases, or what really is the deeper reason
> that this error surfaced right now.

This looks correct. Thank you for the investigation. 

This issue is now fixed.


Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]