From mboxrd@z Thu Jan 1 00:00:00 1970 From: Allen Li Subject: Re: 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: Wed, 1 Nov 2017 21:28:16 -0700 Message-ID: References: <87bmknkwhe.fsf@nicolasgoaziou.fr> <87tvyfjgjk.fsf@nicolasgoaziou.fr> <87tvyelb60.fsf@gmail.com> <87shdykuxc.fsf@gmail.com> <87r2thlewz.fsf@gmail.com> <87o9oll5r8.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eA774-0008KK-Vc for emacs-orgmode@gnu.org; Thu, 02 Nov 2017 00:28:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eA774-0003OL-3I for emacs-orgmode@gnu.org; Thu, 02 Nov 2017 00:28:18 -0400 Received: from mail-pg0-x234.google.com ([2607:f8b0:400e:c05::234]:44748) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eA773-0003NQ-Ud for emacs-orgmode@gnu.org; Thu, 02 Nov 2017 00:28:18 -0400 Received: by mail-pg0-x234.google.com with SMTP id j3so4015134pga.1 for ; Wed, 01 Nov 2017 21:28:17 -0700 (PDT) In-Reply-To: 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: Tim Cross Cc: emacs-orgmode@gnu.org, Nicolas Goaziou I found another one (It is 2017-11-01 in local time for me) (org-time= "<2017-11-01>" "") nil This is also local timezone dependent. Tim made the point that these floats are not intended to be Unix timestamps and only used for comparison, but this implementation detail leaks quite heavily. Furthermore, the value returned by org-2ft for these comparisons isn't even constant. For example (org-2ft "<2017-10-10 10:00:00>") returns 1507629600.0 for me today, but in four days it will return a different value, 1507626000.0. Surprise, the offset from local time to UTC is not constant, even on the same machine in the same timezone. The most immediate impact of this is that all of Org mode's time comparison functions will be wrong when called during a local time offset change. For those of us who are lucky, this may be twice a year, but for others who are unlucky, it may be multiple times per year or month, up to the whims of the local government. This is one of the reasons I think "we're just using them for comparisons" doesn't excuse org-2ft doing its little time shift. The other reason is all of the regressions that change caused, including this current bug, and yet another is my gut instinct that this is a poor design choice from a technical perspective as a software engineer.