From mboxrd@z Thu Jan 1 00:00:00 1970 From: Allen Li 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 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9Kc2-0002wV-91 for emacs-orgmode@gnu.org; Mon, 30 Oct 2017 20:41:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9Kc1-0003UT-II for emacs-orgmode@gnu.org; Mon, 30 Oct 2017 20:41:02 -0400 Received: from mail-qk0-x233.google.com ([2607:f8b0:400d:c09::233]:53803) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e9Kc1-0003Tn-Dm for emacs-orgmode@gnu.org; Mon, 30 Oct 2017 20:41:01 -0400 Received: by mail-qk0-x233.google.com with SMTP id y23so18456410qkb.10 for ; Mon, 30 Oct 2017 17:41:00 -0700 (PDT) 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: emacs-orgmode@gnu.org (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 into (float-time), which is in Emacs localtime. 1. SCHEDULED>"" compares a UTC time against a local time. 2. Either org-2ft should be fixed to be localtime, or 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 (float-time) would be safest.