From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Cross 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: Thu, 02 Nov 2017 22:12:40 +1100 Message-ID: <87375xszmf.fsf@gmail.com> References: <87bmknkwhe.fsf@nicolasgoaziou.fr> <87tvyfjgjk.fsf@nicolasgoaziou.fr> <87bmkl1zy9.fsf@nicolasgoaziou.fr> <87inetm39d.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36430) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eADQY-00006N-Nj for emacs-orgmode@gnu.org; Thu, 02 Nov 2017 07:12:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eADQX-0005gz-Cg for emacs-orgmode@gnu.org; Thu, 02 Nov 2017 07:12:50 -0400 Received: from mail-pf0-x22f.google.com ([2607:f8b0:400e:c00::22f]:56927) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eADQX-0005gL-6p for emacs-orgmode@gnu.org; Thu, 02 Nov 2017 07:12:49 -0400 Received: by mail-pf0-x22f.google.com with SMTP id b85so4328179pfj.13 for ; Thu, 02 Nov 2017 04:12:48 -0700 (PDT) In-reply-to: <87inetm39d.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: Allen Li , emacs-orgmode@gnu.org In a couple of weeks, I will have some spare time and I am happy to look at the time related functions in org-mode to see if we can refactor them to make them a bit clearer and possibly more efficient. I would be hoping for input from the list as guidance experience has taught me that date/time stuff can often have some subtle corner cases which are easily missed. regards, Tim Nicolas Goaziou writes: > Hello, > > Allen Li writes: > >> Alas, I still can't seem to find the original DST bug. I'm not sure >> using UTC solves DST problems. >> >> For example, in the timezone America/Los_Angeles, >> >> <2017-11-05 01:00:00> -> <2017-11-05 04:00:00> = 4 hours >> <2017-10-10 01:00:00> -> <2017-10-10 04:00:00> = 3 hours >> <2017-03-12 01:00:00> -> <2017-03-12 04:00:00> = 2 hour >> >> This is what Emacs gives me using the default time zone >> >> <2017-11-05 01:00:00> -> <2017-11-05 04:00:00> = 4 hours >> <2017-10-10 01:00:00> -> <2017-10-10 04:00:00> = 3 hours >> <2017-03-12 01:00:00> -> <2017-03-12 04:00:00> = 2 hour >> >> This is what Emacs gives me using UTC >> >> <2017-11-05 01:00:00> -> <2017-11-05 04:00:00> = 3 hours >> <2017-10-10 01:00:00> -> <2017-10-10 04:00:00> = 3 hours >> <2017-03-12 01:00:00> -> <2017-03-12 04:00:00> = 3 hours >> >> Using UTC seems strictly wrong to me. > > You're right. Using UTC doesn't solve any DST bug, despite what > I initially thought. I think we just need to remove the whole set of > changes about UTC in `parse-time-string'. We also need to adapt tests in > test-org-clock since the same time difference could have different > meanings depending on the time zone. I can do that later, if no one > objects. WDYT?n > > Refactoring time functions in Org is still useful, though. > > Regards, -- Tim Cross