From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wCJ8KJYCxGP+AwAAbAwnHQ (envelope-from ) for ; Sun, 15 Jan 2023 14:41:42 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 5wGWJ5YCxGNPgwEAG6o9tA (envelope-from ) for ; Sun, 15 Jan 2023 14:41:42 +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 101BC11309 for ; Sun, 15 Jan 2023 14:41:42 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pH3Fb-0000vK-FN; Sun, 15 Jan 2023 08:40:43 -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 1pH3FZ-0000v5-2t for emacs-orgmode@gnu.org; Sun, 15 Jan 2023 08:40:41 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pH3FW-0002Eh-85 for emacs-orgmode@gnu.org; Sun, 15 Jan 2023 08:40:40 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 1710B240039 for ; Sun, 15 Jan 2023 14:40:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1673790036; bh=IwHvjjWMLqFSkVnYOhcuiOzviTyjq3sWEcv4sKpR4x8=; h=From:To:Cc:Subject:Date:From; b=MY71XFR3PXCWxl3uu+OVanFBJEW3kd5oFDmoEEfsJJcMr9/veVkLhhja+1G7VTOBF iHcOCeYkW0WMguJ5lbgSOe72Jf4z741RBOsb55yXCxatA0kGiP3/0Yi6TsoNMTT8EL yH98bdWoPQ8Wqs4/IlVhOZTWkW+DJ5nEAi12GvUQD5qqvYeE1AnUfJoutW80R7kew4 ylwj7wO2QEriXxBFcOqdUEA88mrk6gLLjT0+WgwbL2IYMb3lHknmiTaQ3g7wvBAsQ2 onvujDu+Dg3VTtK/CcDdZTpYh+XDrZUpLZbKujIyCMEbB96nlZwXW1wWHk4bEIOaUn x/F1X0ztV16hw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Nvx9v25Cqz9rxM; Sun, 15 Jan 2023 14:40:35 +0100 (CET) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda In-Reply-To: References: <86zgamtv6o.fsf@gmail.com> <87tu0t1i0c.fsf@localhost> <87k01p1gvx.fsf@localhost> Date: Sun, 15 Jan 2023 13:41:02 +0000 Message-ID: <87tu0rex01.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, 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=1673790102; a=rsa-sha256; cv=none; b=MqeXj9Gop1fiAOFJP3ak7Jqir+PRvfCD4r560bovxhM+IFsgJzsqSF5Nkusz+ndqtC7LGK /s05yp1saarzJ2huJnNHq6IzLVxnGB4VCG7DqGX/T95KU0S7K15zPEOjbNDS6Uw/gfOSQ6 VWCkPLGDRm+DBSs2F8MfmaZ39V/YAQnrDxss4D5p5rP8ac0jVVvp3xkfNXwj9TZ6cSLWdD oqIXHOYFGma+wJhJsAld4N6MnTlGiSsK2qGyLYY74DfnSFpIYV5tTjZm9WEEHrOdaK+L6R NdkjErtXJVzkDveenZVfqqaOpl2bbdr9G0yMoDY2Pq7rctup7VrIhGfyrzxHaA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=MY71XFR3; 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=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673790102; 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=MND+IExp3maqlqX44q3zOws6Bhwht5BWTXnHDvp2gHY=; b=fPPnY1AHuhyeRKYiBqWPyzWEPmERC+2Dzc1k1U81wyB2TjKuMd55gcfVxcrV00iw6FBeNe Qlo84iEcItzf59SElMTjtz4r74ddkmsJj5EBhy+gcJ58xhCB/Q0RH7dk9XnHl1f9RlJwTz 7mqW1zR2K5me2T7IwRMXhMPdNbq170GTT8R3u2Xz+fkpLovJi3F3yK2IkSfvMPG8eBX49p ZGIeBco9VgkRhYpUBpGkYE68CH+K4hvlwiM1HLFlPqsH7ilB4fuao2wqCUKZFH49ZuMNK7 AGBWtr0IVnyHC/yQKppWFmZZfYQTA0/9Sne63lgTi3UYMDJanLCaiROEIXgXjQ== X-Migadu-Spam-Score: -4.56 X-Spam-Score: -4.56 X-Migadu-Queue-Id: 101BC11309 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=MY71XFR3; 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=pass (policy=none) header.from=posteo.net X-TUID: VOK8RnXD6Ya9 Max Nikulin writes: > On 14/01/2023 18:42, Ihor Radchenko wrote: >> >> <2023-01-14 Sat 18:22@Asia/Singapore> (SGD and similar abbreviations are often ambiguous) > > Such format is ambiguous for timezones with DST around backward time > jump. Before/after time transition should be specified in addition, e.g. > by combining identifier and offset or some way to state namely before or > after. Are you referring to one hour in year when the clock is moved one hour forward? <2023-10-29 Sun 3:00@+DST/Europe/Berlin> -> (+1 minute) <2023-10-29 Sun 2:01@-DST/Europe/Berlin> I, however, do not feel like we need this +/-DST special notation. Chances that one needs a timestamp in this specific hour are slim. At the end, countries deliberately choose the time transition to not interfere with business activity. Instead, we can simply allow https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html formats. All of them are supported by `encode-time' anyway. At least, in theory. I just tried: (time-subtract (encode-time 0 1 3 29 10 2023 nil -1 ":Europe/Berlin") (encode-time 0 59 2 29 10 2023 nil -1 ":Europe/Berlin")) (see https://www.timeanddate.com/time/zone/germany/berlin) and it looks like the expected return value should be 1 hour 2 minutes (3720), but it is not, on my system. I am probably missing something though. >> <2023-01-14 Sat 18:22+0800> >> <2023-01-14 Sat 18:22+08> >> <2023-01-14 Sat 18:22@+0800> >> <2023-01-14 Sat 18:22@+08> > > May become incorrect for future events due to updates of timezone database. Emm. No? +8 is offset from UTC. It will not be affected by anything. Or are you referring to scenarios when user actually wants to specify the timestamp for specific country/city? Then the TZ variant should be used instead. What I am essentially proposing in these examples is allowing: 1. TZ format as described in https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html 2. ISO 8601 format https://en.wikipedia.org/wiki/ISO_8601#Time_zone_designators Of course, individual variants of time zone specs may be ambiguous depending on the purpose. Users are to choose what they prefer >> <2023-01-14 Sat 18:22@+08 +1w -5d> > > May be not suitable for time zones with DST since offset changes due to > time transitions. > > I am afraid, sometimes rather long (maybe even redundant) specification > is required, so overlays becomes must have (as for links) to keep > readability. Not necessarily. Most of the timestamps can do just fine specifying either explicit offset or a time zone name: <2023-01-14 Sat 18:22@Asia/Singapore> <2023-01-14 Sat 18:22+08> More exotic scenarios will not be common. And, if the users wish, we do have `org-time-stamp-custom-formats'. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at