From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6GDHOry3Z2CcBAAAgWs5BA (envelope-from ) for ; Sat, 03 Apr 2021 02:33:00 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id ILLVNLy3Z2B0cgAAB5/wlQ (envelope-from ) for ; Sat, 03 Apr 2021 00:33:00 +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 06053C5EA for ; Sat, 3 Apr 2021 02:33:00 +0200 (CEST) Received: from localhost ([::1]:43218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lSUDj-00074l-2l for larch@yhetil.org; Fri, 02 Apr 2021 20:32:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60030) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSUCN-00074Y-H3 for emacs-orgmode@gnu.org; Fri, 02 Apr 2021 20:31:35 -0400 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]:38894) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lSUCJ-0002lG-KR for emacs-orgmode@gnu.org; Fri, 02 Apr 2021 20:31:33 -0400 Received: by mail-lj1-x22a.google.com with SMTP id s17so7044851ljc.5 for ; Fri, 02 Apr 2021 17:31:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=FS8ZSwOc2kc5kzgpu1TI8AAqCdAF9NjEohP9JQ9jh/A=; b=kN8AxXCPNbU7StQW2JqjIYhhesu4lKlyYY6HXjHcAqU/BO1lC07UCSb6ybc+Yy9qXZ 3nV9vPzod5dmKo5TxrKgI8rd7cMG2HF3rXyYq1u2VcNeBPZRXcCLDhcKYt3TJphGThzB oniwE6+YyQ5Q0sQZmMZFUZSmkFD5ikYodqE8yMr1sc3Sk79K/gXMsXqZqjmMTbWpwqaj ArSaLFUHqfxPEEbePQ21xpK7C9bZ7PoXYKySYDIZiOA0cvB4GiwbgFP6ep7iXkYqShZr HXL9ng3KTL3pYQ4dJ1msVihCbv8adVXrJorzEPTHy2T4LYhBYSYAP/hhMfaaMYGXx1Uz 67Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=FS8ZSwOc2kc5kzgpu1TI8AAqCdAF9NjEohP9JQ9jh/A=; b=ifgtfuhIp4DvZqH/ZBTZZFKZHrkZGRJln966GqRMwxtSJhew0eXRqU8ZyBPhye1Nzr FnB7A8G+H7DuIdMXwJYAKSgtSrwVfyk9UOieBFLM76C5IjYMvQbrkoPW9Plkj6susyWD fGR5x9veYbFDDEZtV3yo5FGeg07Aw6J/iSkmGmYoWtui+2/ja25Swz5YTBpFlwQ6Wo48 pS7WXxsd2Yx3P8/JJo7ZLPJYnM+Ebyqjk+OvEZrrGnAGMWEXEnoeLMcI4h5hYq9xTiBe oOp7zsGwWT+ifI+8A8sfF4z41DrcZuEkag2fbZdiCN0z+LYv9rJI0UzdyYCyVfheKtsm s0Hg== X-Gm-Message-State: AOAM531K1r0B1GZbl0iA2sXHn2Zn8T8OhWgv/e9IvcVkNDqIwT9HMvnV 2ixE77b7hqj9YcBIItU+U9s0m38jQuPVVz6CC0Y= X-Google-Smtp-Source: ABdhPJzuzDu25O9Lnw0CLt9fFqi+HnmZBx2xTcjX9b9ENaj1etoy7MJlmxXRI0rbPqJxLcu0zB4LtRIoGyw6yZw5Nyk= X-Received: by 2002:a2e:b1c9:: with SMTP id e9mr9557061lja.39.1617409888701; Fri, 02 Apr 2021 17:31:28 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab3:7842:0:0:0:0:0 with HTTP; Fri, 2 Apr 2021 17:31:28 -0700 (PDT) In-Reply-To: <87blawgrj3.fsf@gmail.com> References: <87blawgrj3.fsf@gmail.com> From: Samuel Wales Date: Fri, 2 Apr 2021 17:31:28 -0700 Message-ID: Subject: Re: Idea for handling timezones To: Tim Cross Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::22a; envelope-from=samologist@gmail.com; helo=mail-lj1-x22a.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: , Cc: emacs-orgmode@gnu.org 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=1617409980; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=FS8ZSwOc2kc5kzgpu1TI8AAqCdAF9NjEohP9JQ9jh/A=; b=WMX70UAPUrUDSfp7iuscIscFx2fPwmCraXSEow433a9kIiIpbgq2ONpCSdILUBFLeVk3yP syeBaFkvHGrekhfrUXk1IvX3a3C3YRNiFCBFkjMgb8fV7iW8qLVX/oVFonLlRbeC4wj/qj xP3kkIn7icMzg+c2y7QmID/muW9H/nvin0uA1+wgXpYxjp+FHSfImOZs1JKxetpGdese48 5cn8if7fyiIswZdZZjVtfFDYpjduNZMbi/3QbcBjoQ/F2hlt3jigTgsEv78S0QSvmnKJ/f DpWBJG6X0/025jnG7UeMPrdQp59s/Ll31WuIpPri0hfRzSmqRBum/k0iNCPrrQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617409980; a=rsa-sha256; cv=none; b=hyPmZ0mbpjW5UkY49BGe7Y3BgxOHWxeI/gVazFIDJY9Aqo4GM7KzmeU6zAzIReLTVDbvpK 9U67w6kkCTiXsCMWMzhwtQHsKPC4ECAvHCznreHWuq1C8nxkGIdYK3nv6t6yW/oxmXzC1b 8LU5QxR+x4RHIPM9N776gBy+mzhYNX8jQNeg9cRl2IKmbJI4pTplhuxYrtdxpzAyYHFITY TEDLL5osMzexH693NmtoGgGH0wfs4eGtT8ruKkAfL+UCw7UdJZL+ScO8gL627Z3j/nHeKb 8F8vjjfepK7rfi8kCfYGS7FBIW0DqPC8kVSM0qxKXWchG32xtbkDwKE53hVmyA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=kN8AxXCP; 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=kN8AxXCP; 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: 06053C5EA X-Spam-Score: -3.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: pEk2C/RYhYsf org has capability of overlaying [or similar] tses with user-defined something or other. for locale type purposes. perhaps, in principle, all tses for users who need tz could be in utc or similar, and such overlays could be used to localize on the fly? On 4/2/21, Tim Cross wrote: > > shironeko writes: > >> Hi everyone, >> >> I, like many others on this list, have to move between timezones quite >> frequently. As I gathered from the archive, it seems the main complexity >> in >> supporting timezones is the difficulty revolving the change of timestamp >> format. >> So I have an idea, suppose we add a new keyword, "TIMEZONE" that can be >> set at >> the start of the file like so >> >> #+TIMEZONE: America/Toronto >> >> This specifies the timezone of all timestamps in the file. Together with >> it, >> there can be a function called e.g. org-shift-time, that shifts all the >> timestamp in the file to another specified timezone and updates the >> keyword. Of >> course, care needs to be taken when dealing with dates without time, e.g. >> it >> should be treated as at time 00:00 when it is alone or as the start of a >> time >> range, and be treated as at time 24:00 when it is the end of a time >> range. >> >> Then there could be hooks that offer to run the function automatically >> when it >> detects the user's system or emacs is set to a different timezone as in >> the file >> (e.g. when they open the file, or opens the agenda). This will make sure >> the >> timestamps always aligns with their current one (if they wish). >> > > I'm sorry, but I don't like this idea. In general, I think it is the > wrong approach and not sophisticated enough to work with the > complexities associated with timestamps. > > This is actually a very hard problem and not one which can be adequately > addressed with something this simple. Problems include > > 1. Timzone alone is not sufficient. Offsets from UTC change due to > daylight savings times etc. > > 2. You can easily have timestamps from different timezones in the same > org file > > 3. Storing timestamps in local time is problematic because of the > inherent ambiguity this can have (again, due to daylight savings times > and what occurs at the 'cut over' time). > > 4. Sometimes, you may want the timestamp to reflect the date/time as it > was when recorded and don't want it to 'change' because your now viewing > it in a different timezone etc. > > Personally, I think timestamp 'storage' and timestamp 'display' need to > be treated separately. I also think all relevant information (timezone, > offset) need to be stored with the timestamp. I also think the > fundamental base timestamp should be stored as UTC, allowing all time > calculations to be consistent (free of daylight savings time changes). > The user can then manage how the value is displayed by setting timezone > and offsets as appropriate (with perhaps the default being the local > system settings or whatever offset/tz was stored with the timestamp > itself). > > It is very difficult to predict or understand all the use cases for > timestamps. Therefore, any scheme must be extremely flexible. Experience > has taught me that one critical component is that at the lowest level, > many problems are avoided if the value is in UTC. Problem is, UTC is not > terribly human friendly. Luckily, this can largely be automated for many > common use cases. Unfortunately, it does also mean that if you are > someone who frequently moves between many timezones, your situation will > be more complicated. > > ne of the most frustrating parts of working with timestamps is daylight > saving times. This causes complications at so many levels. In > particular, I hate the fact change over dates often change and more > often than not, those changes are based around politics and at the whim > of politicians, which makes programatic handling more complex than it > needs to be. > > -- > Tim Cross > > -- The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html