emacs-orgmode
[Top][All Lists]
Advanced

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

[O] Bug: org-2ft and/or float-time is wrong [9.1.2 (9.1.2-22-ga2a034-elp


From: Allen Li
Subject: [O] 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

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



reply via email to

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