From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 YFWRJ47dwmMB7gAAbAwnHQ (envelope-from ) for ; Sat, 14 Jan 2023 17:51:26 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id yLFjJ47dwmN61QAAauVa8A (envelope-from ) for ; Sat, 14 Jan 2023 17:51:26 +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 641E62E717 for ; Sat, 14 Jan 2023 17:51:26 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGjkF-0001LA-Oe; Sat, 14 Jan 2023 11:51:03 -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 1pGjkE-0001Kv-5X for emacs-orgmode@gnu.org; Sat, 14 Jan 2023 11:51:02 -0500 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGjkC-0003aw-Hg for emacs-orgmode@gnu.org; Sat, 14 Jan 2023 11:51:01 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1pGjkA-0004Ou-KL for emacs-orgmode@gnu.org; Sat, 14 Jan 2023 17:50:58 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda Date: Sat, 14 Jan 2023 23:50:52 +0700 Message-ID: References: <63c287ca.a70a0220.4bd14.873b@mx.google.com> <63c2b760.170a0220.56455.a114@mx.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: en-US In-Reply-To: <63c2b760.170a0220.56455.a114@mx.google.com> Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 26 X-Spam_score: 2.6 X-Spam_bar: ++ X-Spam_report: (2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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"; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673715086; a=rsa-sha256; cv=none; b=Zo7FaV8UKFSXbJW3fi8yuzuK+X/TipW3+uLpolfsMR+k0w9iyVEVpVmGJn91N3kGo99rXx Ire6fAAksWTm6bw2gEMtZXgiLzVXdTfUTCMH08ryX6HY0Ki4+f+RJ77DjsFBJ1/2Bkfsjb wDp/3Vdnq+0bhqHCK9/sxT/7n7v8mHqxrl7xw7RXXyON6pqw6+ZbEF86/jKlQf1kgc1aK1 CrBUhstvwoFNiwEKvHi+/D3uRUbt2q8qFH7WBv2riFSWdTX+7nIMGnSt0m0kQK7dVT5LHo v1p5FEVo4w3BW48Cj5l7G+9dxe5CevmcmZdBbXWeY3l/wd6KfZ8v5ZaI44VnRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673715086; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=fjXTXk/QqsQT4NjaCqFK/dY7Uk0VyHo61PApIwDN9wQ=; b=jeRJtwIzMXkUXVEoofV14qC+8iBorczP/obY18KxShJPoi2UeuZAhcbMDCXMgXoZp0mmaz fdn/QsBS3ylJ+C19I7mCnqwBVnVICCR1QFTXfXfC33rm7NZakvF90GhuFxMF0nemktv9Sa gktOxyjgjm4F81pdLxEo//AGI3ygEDAE3UkM2tfEX2NVK0L4UmJQkrysjlqSd828voeW4X YpwqUpgKin6KxcC5NebREdnRQ8rsJ9stCOwBuJXeDkVeAohcnlqTDtFW5ZkoSSrp4Gjx/6 RLRzkZkG6FPm2HkKXx71TO197N564bv/m24Gln4WkFSdeLACYLCVElnD7M2bmg== X-Migadu-Queue-Id: 641E62E717 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none; 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"; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none) X-Migadu-Spam-Score: -2.31 X-Spam-Score: -2.31 X-TUID: xXvz4wDprhSa On 14/01/2023 20:50, Tim Cross wrote: > > I"m sorry, but I don't follow. The UTC time is the only time whihc is > not affected by daylight savings transitions, so is the only stable > metric. All the others are relative to that time but can change based on > things like changes in DST transition dates/times. When DST transitions > occur, time is lost/gained wrt the local time, but real time and UTC > time do not change. So when DST starts here at 2am on the llth it is 5pm > on the 10th UTC. At 2am locally, we jump to 3am, losing an hour, but the > UTC time is still 5pm. The meeting I had scheduled for 10am with friends > form the US was at 0:00 UTC. It is now at 11am local time, but still at > 0:00 UTC, however, I will likely fall asleep in it because instead of my > normal 7 hours sleep, I only got six despite going to be and getting up > at the same time. Future events may be affected by changes in timezones happened after scheduling them. UTC timestamps becomes incorrect in such cases. Let's assume that a company from Sydney has a weekly meeting on Mondays at 15:00 *local* time. Their standard time offset is +10:00 TZ="Australia/Sydney" date --date '2023-07-15 15:00' '+%F %a %T %Z %z' 2023-07-15 Sat 15:00:00 AEST +1000 They decided to invite a person from Singapore (no DST) to join the meeting online next year on 2024-01-15 during the period of summer (daylight saving) time (+11:00 offset) in Australia: TZ="Australia/Sydney" date --date '2024-01-15 15:00' '+%F %a %T %Z %z' 2024-01-15 Mon 15:00:00 AEDT +1100 The person in Singapore should schedule the event at LANG=C TZ=Asia/Singapore date --date 'TZ="Australia/Sydney" 2024-01-15 15:00' '+%F %a %T %Z %z' 2024-01-15 Mon 12:00:00 +08 +0800 the same moment as UTC timestamp date --utc --date 'TZ="Australia/Sydney" 2024-01-15 15:00' '+%F %a %T %Z %z' 2024-01-15 Mon 04:00:00 UTC +0000 If Australia were decided to cancel daylight saving time transition then for the Singapore partner the meeting would be shifted by 1 hour to LANG=C TZ=Asia/Singapore date --date '2024-01-15 15:00 +1000' '+%F %a %T %Z %z' 2024-01-15 Mon 13:00:00 +08 +0800 LANG=C date --utc --date '2024-01-15 15:00 +1000' '+%F %a %T %Z %z' 2024-01-15 Mon 05:00:00 UTC +0000 If the guest from Singapore or some guy from Australia decided to store the appointment in UTC, not as local time, they would expect beginning of the meeting at 14:00 (Sydney time) instead of 15:00. The primary data for this event is 2024-01-15 15:00 Australia/Sydney everything else is derived accordingly to current state of timezone database and should be recalculated in the case of its change: - AEDT +1100 - 2024-01-15 Mon 04:00:00 UTC +0000 - 2024-01-15 Mon 12:00:00 +08 +0800 Asia/Singapore So future events bound to local time must be stored as local time and the corresponding local timezone. UTC must be used for global events (e.g. an eclipse) or if the negotiation is to fix event time in UTC. UTC is not a silver bullet for time computations, it should be used consciously.