From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wNjPI7lwyGOKVAAAbAwnHQ (envelope-from ) for ; Wed, 18 Jan 2023 23:20:41 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id mA7cIrlwyGPsBQAAG6o9tA (envelope-from ) for ; Wed, 18 Jan 2023 23:20:41 +0100 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 4855634C1 for ; Wed, 18 Jan 2023 23:20:41 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIGmp-0000OO-VT; Wed, 18 Jan 2023 17:20:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIGmo-0000OF-OH for emacs-orgmode@gnu.org; Wed, 18 Jan 2023 17:20:02 -0500 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pIGmm-0007OZ-Uc for emacs-orgmode@gnu.org; Wed, 18 Jan 2023 17:20:02 -0500 Received: by mail-pj1-x102b.google.com with SMTP id o7-20020a17090a0a0700b00226c9b82c3aso2174pjo.3 for ; Wed, 18 Jan 2023 14:20:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:in-reply-to:date:subject:cc:to:from:user-agent :references:message-id:from:to:cc:subject:date:message-id:reply-to; bh=DCsNMUdx3QkGA71+F9D5Zk5OPOJU4zqaNkJs5Q58Dbc=; b=qeigRGHnIcZf9sTcGpQ9DpSSsHeliWNF8XIwk5Gf2kkBklrFKNlvPocZtwIkfB//87 twAIrBlVr0TEY8ZnK7a2m5b0Y5k+KD72S8E1uMKe5O08CWZynjxeS8zEWm2pDR2WmduF jWPduteW5ugGNudr8qh5xwjP/g1cf8lYsFzMbz774jZDBxBNM9lSYyLVNVufNMBU9eRR R6h+OzCp+m7Dr6CXHZ9hLyn0dF6WY417retZQjHQquBiTOZuxWjpPvuKVZSf7kZcamyQ yIHH4rXHuBV8hr9wIbq/GnVwHD9xPjnIBBbQKoTVg/4jBHkdeC6IFTULb0lFg4aCDhrE PmJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:in-reply-to:date:subject:cc:to:from:user-agent :references:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=DCsNMUdx3QkGA71+F9D5Zk5OPOJU4zqaNkJs5Q58Dbc=; b=YlI57iAeTjiytWEL0UcP7WtuCOPv1O1mgQoR/iuxV1Yu2N6DcLYzab6SBWskH+Vnyc IHsuhn2yhSbA9/IzkApQ5zQdQcw3ARIHE3l4skTEjOD58Et7OZZ8UNLDx982sGTOcLmG yQwdvqtWRBKaYxkNh888+McePOh+/gYDGdRCLkZSBgij6L9Derp3HdsNROf2ecNvbphj HFXgVW9r0isKdKWqDIJkgMg1YmOphuwIQAT6GA2ZedHku/9kDhtZ2R1i72RbOgC07kk7 YVLZM5BNTxsYz9mv6gO5mZFtLC74lqOc/UNMYRX+dxr7VAVWcvrR4HTf00DFUSlYJcTb iuwA== X-Gm-Message-State: AFqh2krcRZbFlHAAzRCBqsO950h/N+mkD+hEB9fmE/kzVWP93y8Wm4/k SmewjwDuIIlUwvatw0r4QvWiaZ4CNQc= X-Google-Smtp-Source: AMrXdXsTpvt3UvGvqBBA4ky8QPYILK+YAlG1T0goyq7mCNcAbtS3YG956VjZvcV6QSRWkfXPSHoWIQ== X-Received: by 2002:a17:902:9f8b:b0:194:b552:f7b7 with SMTP id g11-20020a1709029f8b00b00194b552f7b7mr5082815plq.16.1674080398870; Wed, 18 Jan 2023 14:19:58 -0800 (PST) Received: from dingbat (220-235-140-148.dyn.iinet.net.au. [220.235.140.148]) by smtp.gmail.com with ESMTPSA id j14-20020a170903024e00b00177f25f8ab3sm23669558plh.89.2023.01.18.14.19.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 14:19:58 -0800 (PST) Message-ID: <63c8708e.170a0220.ba554.60ef@mx.google.com> X-Google-Original-Message-ID: --text follows this line-- References: <86zgamtv6o.fsf@gmail.com> <87tu0t1i0c.fsf@localhost> <63c2aa9e.170a0220.3bb49.9ef4@mx.google.com> <87pmbhz1x6.fsf@localhost> <87wn5mlo7f.fsf@localhost> <87pmbelnd0.fsf@localhost> <87fscajo2q.fsf@localhost> <87a62g8a2m.fsf@localhost> User-agent: mu4e 1.9.16; emacs 29.0.60 From: Tim Cross To: Ihor Radchenko Cc: Jean Louis , Daryl Manning , emacs-orgmode@gnu.org Subject: Re: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda Date: Thu, 19 Jan 2023 08:31:07 +1100 In-reply-to: <87a62g8a2m.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=theophilusx@gmail.com; helo=mail-pj1-x102b.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.29 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674080441; a=rsa-sha256; cv=none; b=Iz5fWRX7tfPBqrUw1I0Lwlh/Oc+a+1kYJfGjd+YWtHqJkj0eq6lOWK3d9lM5p28PzoQfPk 5nb0Eq5VQ9y4bwMm+gG4R8wPlcKBR0b1m0phKD02fUE0sSJsKcz5/0D5nuPk+1hdqWMbrv bSbh1NrCCIGWG9JVS6dfbA1UNKB5+rnwtVMo/OQgOMkjOOJ+aSnEnemsMwlTE/KXOF5EXQ RD/94imGi6rNmBgQvroPW8yKrrMdAhDU/I/zP3hu1iO9W3D9ycHFhbxuPFgKXRO74kf5tS lZHyWMhWxOUHsrD8KcCPU88Y4Pfzn8bXulvZoW31gN/bpb2wNyaUUcEtQyYoDA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=qeigRGHn; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674080441; 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=DCsNMUdx3QkGA71+F9D5Zk5OPOJU4zqaNkJs5Q58Dbc=; b=XnrmnfUVwXr1Yl6SnujDWwOVmGUNUPaoSmGhAkqMzROa0RPzZdiNQBAbE1OX/QEAaqpJbJ Z+htaw9crdFpnoNoaMs5WS5mZTncLXm8uZsgiGF2svWgl1hz8EHlg+5YPBBCafS7jR2hX1 AYtkwsP/jKEfVoNH0JCfP0AVBp5mnM3iSHq0OFWI6PqvghGRlh31qxWoAneTpj+/1Pq1VH 2xUQk9bpPd7DOiSupOK76aZpC0iq2310HnscxfY0RvfUnyCkSeg3SXX1gS45djz0kaYZ4n LQKm2xqsAw1sw2GYMyC0fkwXHl8iUbGpXWLbYfRhmshlaeSj6IQAmhe0CH04BA== X-Spam-Score: -9.59 X-Migadu-Queue-Id: 4855634C1 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=qeigRGHn; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -9.59 X-TUID: C3qYbwRior0t Ihor Radchenko writes: > Jean Louis writes: > >> ... >> Should be part of C library to observe those things. > > Sure. My previous proposals are all relying on `encode-time' which uses > time.h from system libraries and utilizing TZDB that is taking care > about all this insanity. > > We, however, might need to be careful about applying date increments. In > `org-read-date' and `org-timestamp-change', which are implemented in > Elisp without considering these complexities. (maybe also other > functions; these are just the ones I can think about) > > What should we do when: > > 1. It is close to DST transition 2:59 -> 2:00 -> 2:01 -> ... -> 2:59 -> 3:00 > and the users asks to create a timestamp +1h from now > or, worse, a timestamp +1h from now in a different time zone > > 2. A user asks +1w date shift and the time zone has a 1-day jump during DST? > what about +7d? +1d? > > 3. What will be +1d 2:30am timestamp refer to when there DST transition > as in (1)? Yep, these are exactly the sorts of issues I was worried about wrt adding time zone support. Challenge here is I'm not sure there is one right answer. It will depend on individual use cases. I guess the best we can do is select what seems to be the most 'sane' approach and document th elimitations (and possibly how to work around them). The key is likely to avoid user surprise. Limitations are often better accepted when flagged up front and when 'discovered' later. Initially, my thoughts on the 3 above are "I have no clue what the sane default is" - all options seem to have equal pros and cons. Guess the best we can do is go with the simplest solution and 'suck it and see".