emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Derek Feichtinger <dfeich@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Problem with org-timestamp-up and timezones
Date: Sat, 16 Apr 2016 11:43:57 +0200	[thread overview]
Message-ID: <87k2jxvqg2.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <loom.20160415T234302-998@post.gmane.org> (Derek Feichtinger's message of "Fri, 15 Apr 2016 21:56:58 +0000 (UTC)")

Hello,

Derek Feichtinger <dfeich@gmail.com> 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	other threads:[~2016-04-16  9:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-13  6:21 Problem with org-timestamp-up and timezones Eric Abrahamsen
2016-04-14  0:53 ` Jesse
2016-04-15 11:50   ` Derek Feichtinger
2016-04-15 11:56     ` Derek Feichtinger
2016-04-15 16:35       ` Robert Eckl
2016-04-15 21:56         ` Derek Feichtinger
2016-04-16  9:43           ` Nicolas Goaziou [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k2jxvqg2.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=dfeich@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).