From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Problem with org-timestamp-up and timezones Date: Sat, 16 Apr 2016 11:43:57 +0200 Message-ID: <87k2jxvqg2.fsf@nicolasgoaziou.fr> References: <87twj6t4ei.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arMjc-0003SE-8D for emacs-orgmode@gnu.org; Sat, 16 Apr 2016 05:41:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1arMja-0002O1-NO for emacs-orgmode@gnu.org; Sat, 16 Apr 2016 05:41:48 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:38142) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arMja-0002NK-HC for emacs-orgmode@gnu.org; Sat, 16 Apr 2016 05:41:46 -0400 In-Reply-To: (Derek Feichtinger's message of "Fri, 15 Apr 2016 21:56:58 +0000 (UTC)") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Derek Feichtinger Cc: emacs-orgmode@gnu.org Hello, Derek Feichtinger 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