From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OKWqMbv5aGAlOwEAgWs5BA (envelope-from ) for ; Sun, 04 Apr 2021 01:26:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id yJWjK7v5aGDPMAAAbx9fmQ (envelope-from ) for ; Sat, 03 Apr 2021 23:26:51 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F365319340 for ; Sun, 4 Apr 2021 01:26:50 +0200 (CEST) Received: from localhost ([::1]:57738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lSpfE-0005Fg-Lu for larch@yhetil.org; Sat, 03 Apr 2021 19:26:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSpeN-0005EN-NK for emacs-orgmode@gnu.org; Sat, 03 Apr 2021 19:25:55 -0400 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]:44567) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lSpeL-0004RF-De for emacs-orgmode@gnu.org; Sat, 03 Apr 2021 19:25:55 -0400 Received: by mail-pj1-x102f.google.com with SMTP id kk2-20020a17090b4a02b02900c777aa746fso4142048pjb.3 for ; Sat, 03 Apr 2021 16:25:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:subject:date:in-reply-to:message-id :mime-version; bh=Mo6BLtxThXBfF+88RzXPfqIy/wpBaeqGwPSoH06ai2k=; b=jcxY8gNeyUMDI8ghyt+WHYJHI0/IU0mlNU03dBYViIY2IB4ABdb3Ws2hJUDte1Vve7 6GA0y0nOmuWQzMVlmtgqzQzNDjhO+NFYj+HqlbB60TahMJeIMdom1w2MZ0zwRZLLz2zz 1kyEf4NrwUHCYWf7d8y//IqzNHafaY1yQfAGpozLmsyAuQO1bR2+9iEVQuhGzTZQRXRs MG9+lsSfLpzR92w+wxEFevOIEscT8kvuXzvXuc8f9cyDHfhtvIDymysQQyKKVBzfmToG 0AR3p+LJtM9YvOt0DGRdPP4KzUSlIvyWEcIGFipcIqm8cs8t4IOYdtWS/XZ7ZsFu/oYK O/4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:subject:date :in-reply-to:message-id:mime-version; bh=Mo6BLtxThXBfF+88RzXPfqIy/wpBaeqGwPSoH06ai2k=; b=sv5VxR7VGseQGfhaBvvk3DhmKZ3zeIYVMyw+OMZBJUW7NAOd5VV/mEiaXQ4iYhINHS 0dRZwwHdDg2CIZ6E6hJIgUQi5K8mF6mzXXVPRzdgAVJeo9h+dj3+fPLt6yCSIwWrypea Uhxi0LVmKfxOl53ffWnASrTUwVw3aP+zrpXYSshqa82eQKi8wN3vqqgtZb22eTX/ynk7 EGHIa09mS60q+EyQzOa0dnWrYhMWLslKVw8AbGbLYfThM2O6nFGYs0FT5tBPLacyl/hM hS8k/PljR7d8GtPelpUB3vTy/EddL6Qpp8hyL/0KiGERKW3e05uzBrF4CX6Ky+gH0A4i rbxw== X-Gm-Message-State: AOAM532HWG5gxobsPNheynIj9AjNdMg7GuoNL81JLblBdPRrTyZ42rq1 CQ64yWkfjtfFCgAyXFUyYqbdc/nUxVU= X-Google-Smtp-Source: ABdhPJwqbFk7KzlKfAhLwoU8G5FLe8eQ+lF9lA+QJH9ecYboZ7BMZYYnsFAVT7HRS+jLwILD+eTr2Q== X-Received: by 2002:a17:902:e906:b029:e5:c6d2:7dd0 with SMTP id k6-20020a170902e906b02900e5c6d27dd0mr18137633pld.12.1617492351458; Sat, 03 Apr 2021 16:25:51 -0700 (PDT) Received: from tim-desktop (203-206-12-158.dyn.iinet.net.au. [203.206.12.158]) by smtp.gmail.com with ESMTPSA id w21sm2704785pjy.52.2021.04.03.16.25.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Apr 2021 16:25:51 -0700 (PDT) References: <20210403150042.GK27597@maokai> <701561.1617475882@apollo2.minshall.org> User-agent: mu4e 1.5.11; emacs 28.0.50 From: Tim Cross To: emacs-orgmode@gnu.org Subject: Re: Idea for handling timezones Date: Sun, 04 Apr 2021 08:47:35 +1000 In-reply-to: <701561.1617475882@apollo2.minshall.org> Message-ID: <87y2dz54sk.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=theophilusx@gmail.com; helo=mail-pj1-x102f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1617492411; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Mo6BLtxThXBfF+88RzXPfqIy/wpBaeqGwPSoH06ai2k=; b=MVA6/MehCrKhPeF6Gs+gwW+ImiBNsL2eKUi4F+YHO3bX/a125gwu3CkFGi+FrroRHejBBn e/7CgaeVcSL6Oag/Y4OFnMQwUDq1frYt/5itDyhQHD3g5+9G59513Q8kSKwCz871kAI6Um UKEykIZ6tAbDfGVlYfFt46C/sUTXnkQNQvDMVZmukqGozy9bhcynh1xwvSRUOEkq7aKmI4 mU5PQDW06HZK0mO3Q/quF2sGUdWRiOVrG5x7xjJYC+AJMCgpoVA6rjQR4dtoTKCtSwqY7Z ORvZSOw7O+btw92B5V63hVcfDJvEwGIFRT+cZopxkA8B2H2S0+1XEU8y3j8XEQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617492411; a=rsa-sha256; cv=none; b=lAPHO9IJeMqC7kKok7m2E/j2DrsN/pLXi2mCqpOEoFbnq73hOVFFDNiQMkKgsqDa33kD3Y KtSWSFZmwCxm3fmCOvkyPi+sSIm+LqBuy3YplgMlwWRBncmoai6RC7A/bMhjq44SBUctfS 4ZWiVitYpTqYNuRqV0Pz3uH2qnD0xV0Tsf3kteEWo8IGy0yqO+ClDIZf4WLrS3Wp8ZlQFj SIctHR3z1M+MMyNxqc44x1Ed73LpQrDb16O1l3EHdtgl8irwfzFsTAP/eau+ByJ0PNx2nK rLGli4Q7VjxujlaY5r+EIv4JnJCgzZaS3N07Duz2rD3vt3joAi6zBZywjHW4tQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=jcxY8gNe; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=jcxY8gNe; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: F365319340 X-Spam-Score: -3.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: U0OSldekGJJq Greg Minshall writes: > Russell, > >> I would not suggest using UTC. I believe one of the reasons timestamps >> didn't include TZ information was to keep them short and human >> legible. Solutions with overlays to change a timestamp reduce the >> usefulness of the plain text reading of Org (ie: less, grep, >> etc). Storing timestamps with UTC is really a shortcut for the >> computer, not the user. > > i wonder if this is perhaps another place where "org mode as simple > text" conflicts with "org mode to solve difficult problems". that comes > up from time to time (using dollar signs as delimiters for math is one > recent example, another is "-" being "filled" into column one and taken > as an item in a new list). > > it's a hard line to straddle. > I think you are correct. There are fairly frequent issues associated with timestamps and much of it is due to the tension between trying to have something which is human friendly and having something which lends itself to being used for calculations or in an environment where the timezone regularly changes (i.e. from someone who travels a lot). Adding timezone infomation to timestamps by default is not difficult. Org uses Emacs' time handling functions under the hood and supports setting custom timestamp formats. If I was someone who regularly moved between timezones, I would definitely modify the default format to ensure timezone information is recorded with the timestamp. This would at least let the user know what timezone was being referenced when the timestamp was created and what needs to be done to (even mentally) convert it to whatever the current timezone is. For any calculations involving timestamps, the only sane way to do things is to convert all timestamps to UTC, perform the calculation and if necessary, convert back to localtime for final result. It was mentioned elsewhere in this thread that issues associated with DST changes are OK because they occur early in the morning and not much happens around then. However, this ignores use cases that depend on calculation of time intervals. Provided all calculations are performed using UTC, everything should work as long as timestamps include TZ info. I don't like the idea of having a header variable which records the timezone. I think this will be a source of errors and confusion and just won't work well for many setups (for example, people like me who have many org files with timestamps in them). I feel a better result would be to - Update default timestamp format to include timezones - Add a new function which would either (or all of) - Convert an existing timestamp to a specified tz - Convert all timestamps in a file to a specific tz - Convert all timestamps in agenda files to a specific tz - Convert all timestamps in all org files to a specific tz User can then run the function as required (for example, after changing timezone location). - Ensure all exporter back ends support the ability to set an export timestamp function, allowing changing/stripping of TZ data during export as you frequently want a more concise format in exported documents. I believe this is already supported to some extent. The other things we could probably add is a timestamp display tooltip/overlay which could be defined to popup when the mouse/cursor is on the timestamp and which would display the timestamp in some timezone which the user could specify as an option and which defaults to whatever the local timezone is at the time. Then, when you see a timestamp which is in lets say US EDT and your in Tokyo, moving your cursor or placing your mouse on that timestamp would display a tooltip showing the local time equivalent. -- Tim Cross