From: Allen Li <vianchielfaura@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Bug: org-2ft and/or float-time is wrong [9.1.2 (9.1.2-22-ga2a034-elpaplus @ ~/.emacs.d/elpa/org-plus-contrib-20171023/)]
Date: Mon, 30 Oct 2017 17:40:59 -0700 [thread overview]
Message-ID: <CAJr1M6d5ccgteNjMncKeOVfS3uygkpRte4i2Hem4-WOJEBA51A@mail.gmail.com> (raw)
(current-time-string (time-to-seconds (org-2ft "<2017-10-31>")))
"Sun Oct 29 17:00:00 2017"
This seems wrong
In org-2ft
(org-parse-time-string s nil t)
The t means use UTC instead of Emacs local time.
However, Org translates <now> into (float-time), which is in Emacs localtime.
1. SCHEDULED>"<now>" compares a UTC time against a local time.
2. Either org-2ft should be fixed to be localtime, or <now> should be
(float-time) in UTC.
I don't know how Org internals works, but my experience so far has
been that Emacs and *nix in general is very naive about timezones; a
naked timestamp is assumed to be localtime if it does not have
accompanying timezone information.
Thus, it seems to be more correct to change org-2ft to parse times as
localtime. However, I don't know if UTC timestamps are assumed by
other parts of Org internals, in which case fixing <now> (float-time)
would be safest.
next reply other threads:[~2017-10-31 0:41 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-31 0:40 Allen Li [this message]
2017-10-31 4:33 ` Bug: org-2ft and/or float-time is wrong [9.1.2 (9.1.2-22-ga2a034-elpaplus @ ~/.emacs.d/elpa/org-plus-contrib-20171023/)] Allen Li
2017-10-31 18:23 ` Nicolas Goaziou
2017-10-31 18:35 ` Allen Li
2017-10-31 18:52 ` Nicolas Goaziou
2017-11-01 5:07 ` Allen Li
2017-11-01 5:41 ` Tim Cross
2017-11-01 6:26 ` Allen Li
2017-11-01 7:18 ` Tim Cross
2017-11-01 8:28 ` Allen Li
2017-11-01 13:09 ` Tim Cross
2017-11-01 19:14 ` Allen Li
2017-11-01 19:21 ` Allen Li
2017-11-02 0:09 ` Tim Cross
2017-11-02 0:26 ` Allen Li
2017-11-02 3:27 ` Tim Cross
2017-11-02 4:05 ` Allen Li
2017-11-02 4:28 ` Allen Li
2017-11-02 4:49 ` Allen Li
2017-11-02 4:56 ` Tim Cross
2017-11-02 5:12 ` Allen Li
2017-11-02 16:19 ` Nick Dokos
2017-11-02 19:56 ` Tim Cross
2017-11-01 20:55 ` Nicolas Goaziou
2017-11-02 0:10 ` Allen Li
2017-11-02 9:35 ` Nicolas Goaziou
2017-11-02 11:12 ` Tim Cross
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=CAJr1M6d5ccgteNjMncKeOVfS3uygkpRte4i2Hem4-WOJEBA51A@mail.gmail.com \
--to=vianchielfaura@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).