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 12:14:36 -0700 Message-ID: References: <87bmknkwhe.fsf@nicolasgoaziou.fr> <87tvyfjgjk.fsf@nicolasgoaziou.fr> <87tvyelb60.fsf@gmail.com> <87shdykuxc.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]:57725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9yTH-00062d-8l for emacs-orgmode@gnu.org; Wed, 01 Nov 2017 15:14:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9yTG-0007rt-5X for emacs-orgmode@gnu.org; Wed, 01 Nov 2017 15:14:39 -0400 Received: from mail-qk0-x22c.google.com ([2607:f8b0:400d:c09::22c]:53975) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e9yTF-0007rZ-WB for emacs-orgmode@gnu.org; Wed, 01 Nov 2017 15:14:38 -0400 Received: by mail-qk0-x22c.google.com with SMTP id y23so3994195qkb.10 for ; Wed, 01 Nov 2017 12:14:37 -0700 (PDT) In-Reply-To: <87shdykuxc.fsf@gmail.com> 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 On Wed, Nov 1, 2017 at 6:09 AM, Tim Cross wrote: > > Allen Li writes: > >> On Wed, Nov 1, 2017 at 12:18 AM, Tim Cross wrote: >>> >>> My preferences would be >>> >>> 1. If a timestamp does not include the TZ, then assume the local TZ >>> 2. If a timestamp does include the TZ, honour that TZ >> >> Org mode does not support TZ in time strings and adding support isn't >> the topic of the current bug. >> > > I disagree. The root cause of the bug is due to a lack of clarity > regarding timezones. I also suspect this is also the basic cause of > issues relating to the use of timestamps/time strings and daylight > savings, especially when it comes to performing calculations etc. Unless I missed something, Org mode does not support explicit timezones in Org timestamps, and adding such support would take a large effort [1]. [1]: https://lists.gnu.org/archive/html/emacs-orgmode/2011-04/msg00299.html Unfortunately, I do not have time for the task. Thus, Org mode will have to make due with only Org timestamps without an explicit timezone unless a savior appears. > >> I want to emphasize the distinction between timestamps and time >> strings. Timestamps are a >> float value, Unix timestamps. Time strings are Org mode specific, >> like <2017-10-30 12:34:56> > > Org mode refers to what you are calling time strings as timestamps. In > reality, there is no difference - one is just a numeric representation > and the other is a string representation. It is good you have clarified > your definition to reduce confusion. However, I think the problems are > arising because of a lack of explicit TZ handling. There's a pretty significant difference. Unix timestamps are standardized and used widely by most computers and Emacs itself. Unix timestamps are time zone agnostics. Org timestamps (time strings, whatever) are used exclusively by Org mode. As Org timestamps do not support explicit timezones, they are not time zone agnostic. The interpretation of an Org timestamp depends on the time zone of the local machine, whereas the interpretation of a Unix timestamp does not depend on the time zone of the local machine. > >> >> Timestamps do not have timezone information since they describe an >> exact (well, minus leap seconds) >> point in time, the number of seconds after the epoch. >> > > A point in time is measured in number of seconds since epoch. However, > if you want to use local (wall) time to display that point, you have to > include TZ information when converting that number to a more > meaningful/usable (for humans) format. I'm not sure what you mean. Time zone information is provided by the local machine OS. If I pass a Unix timestamp to Emacs/the OS and tell it to format it in human readable format in the local time zone (the default behavior), then it will be done, without my having to attach time zone information anywhere. > The point 'now' for me is UTC+1100 > and for you (based on your previous post) UTC-0700, so our > representations in string format of this value will be different. Even > on a single machine, it is also relevant. For example, if I have two org > timestamps (your times strings) and I want to calculate the number of > hours between the two, I need to include TZ information as one timestamp > might be during daylight savings time and the other outside daylight > savings time. Ideally, except Org mode does not support including explicit TZ information in Org timestamps. Thus, Org mode can only current interpret Org timestamps according to some blessed time zone. Four months ago, that blessed time zone changed from the local machine's time zone to UTC.