emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 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/)]
@ 2017-10-31  0:40 Allen Li
  2017-10-31  4:33 ` Allen Li
  0 siblings, 1 reply; 27+ messages in thread
From: Allen Li @ 2017-10-31  0:40 UTC (permalink / raw)
  To: emacs-orgmode

(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.

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2017-11-02 19:56 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-31  0:40 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  4:33 ` 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

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).