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 kIVMKkQ1aGCFAQEAgWs5BA (envelope-from ) for ; Sat, 03 Apr 2021 11:28:36 +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 yJGkJEQ1aGBEcAAAB5/wlQ (envelope-from ) for ; Sat, 03 Apr 2021 09:28:36 +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 34B1A17BD5 for ; Sat, 3 Apr 2021 11:28:36 +0200 (CEST) Received: from localhost ([::1]:45106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lSca3-0006EN-7u for larch@yhetil.org; Sat, 03 Apr 2021 05:28:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lScYO-0006C1-Rz for emacs-orgmode@gnu.org; Sat, 03 Apr 2021 05:26:52 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:48735) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lScYM-0004IP-Vb for emacs-orgmode@gnu.org; Sat, 03 Apr 2021 05:26:52 -0400 X-Originating-IP: 61.149.237.132 Received: from [192.168.1.32] (unknown [61.149.237.132]) (Authenticated sender: shironeko@tesaguri.club) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id D038660002; Sat, 3 Apr 2021 09:26:46 +0000 (UTC) Message-ID: Subject: Re: Idea for handling timezones From: Shironeko To: tomas@tuxteam.de In-Reply-To: <20210403083029.GC19516@tuxteam.de> References: <20210402113434.GB16839@tuxteam.de> <47bc203d8a8facda27c59c363319ae195d643dba.camel@tesaguri.club> <20210403075608.GA19516@tuxteam.de> <6C3BE991-28DD-4AF5-9912-431112314A01@tesaguri.club> <20210403083029.GC19516@tuxteam.de> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-qZ3kOWc3lCjbJS1f/gj+" Date: Sat, 03 Apr 2021 17:26:43 +0800 MIME-Version: 1.0 User-Agent: Evolution 3.38.4 Received-SPF: pass client-ip=217.70.183.195; envelope-from=shironeko@tesaguri.club; helo=relay3-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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=1617442116; 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; bh=/U284BoGdx4rsv/UPzF34Zd5VGEt6VtJn+51d4fxS7U=; b=QJp++xUgXh9cSE0Zl/r17tSoZcMWMHXpQ9zN7FXKkUqHMn0DwPqlUEkwhkdghrl3Nahcfa kti0B2v+QFCutpNQDHuYwMmp0j+po7puAJ8h7GetOhwJZ4j7dVJsB8M6H7YEB63kNsdE0q XzQavbE/CosUa2LDv/LuHSGiiwlltozwlG+7effsn7C9ozrgMzE2YHylm5dKXrSlut6Hz9 vltaVbQqqVGp/YDLJ3CI/s6wjsv5t4gpUvkWv7lG7Ypa9i+uCE+EB8emnwawdnEr/iO6Oh I4V4oUsBDsu922Iuy/oNFSAUyYe34yxNfYLG0sPIahipxWS9j3ds9gyvJGbxmQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617442116; a=rsa-sha256; cv=none; b=XuBMnzwI+P+cBI0iz23c6YOqIyE3sItguRtBmZ5mQvcE0HpbgAm9qoeg2qpOhotarEgiF+ nT4vxwz1kCbjUSPQQsYfi77TJTy82sfX2OhatAo2nZNZzMreSG+IBfwz89kt/KpTkUAQMC siWSOlonWW/beaTrSDEjKzeISfEM7d2xv8cer6lB3MkuUrb2yGOmeWIQGuk2mkWttBccRQ ZYqtqa4hfwAkppvQqlZzTMPGOhlsPaoNgyqgMHP5gDy+ixtEKsZRMc4W81TwlB9e/9SXLT gVhqlGSQyr5XYRov/ewsQpzj7VbqCKvotCAWJbr+ALebopKNAjNCzGcWwv0LmA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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: -4.53 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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: 34B1A17BD5 X-Spam-Score: -4.53 X-Migadu-Scanner: scn0.migadu.com X-TUID: jtGCHi7JFVum --=-qZ3kOWc3lCjbJS1f/gj+ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable tz database and tools using it like the date(1) command can convert between local times taking into account all the difference like daylight savings ti= me. An example below, Toronto observes daylight savings whereas Shanghai does n= ot: $ TZ=3DAsia/Shanghai date --date=3D'TZ=3D"America/Toronto" 2021-11-07 Sun 0= 0:30' Sun 7 Nov 12:30:00 CST 2021 $ TZ=3DAsia/Shanghai date --date=3D'TZ=3D"America/Toronto" 2021-11-07 Sun 0= 1:30' Sun 7 Nov 13:30:00 CST 2021 $ TZ=3DAsia/Shanghai date --date=3D'TZ=3D"America/Toronto" 2021-11-07 Sun 0= 2:30' Sun 7 Nov 15:30:00 CST 2021 $ TZ=3DAmerica/Toronto date --date=3D'TZ=3D"Asia/Shanghai" 2021-11-07 Sun 1= 2:30' Sun 7 Nov 00:30:00 EDT 2021 $ TZ=3DAmerica/Toronto date --date=3D'TZ=3D"Asia/Shanghai" 2021-11-07 Sun 1= 3:30' Sun 7 Nov 01:30:00 EDT 2021 $ TZ=3DAmerica/Toronto date --date=3D'TZ=3D"Asia/Shanghai" 2021-11-07 Sun 1= 4:30' Sun 7 Nov 01:30:00 EST 2021 $ TZ=3DAmerica/Toronto date --date=3D'TZ=3D"Asia/Shanghai" 2021-11-07 Sun 1= 5:30' Sun 7 Nov 02:30:00 EST 2021 The ambiguity caused by dialing back is resolved with $ TZ=3DAsia/Shanghai date --date=3D'TZ=3D"America/Toronto" 2021-11-07 Sun 0= 1:30 EDT' Sun 7 Nov 13:30:00 CST 2021 $ TZ=3DAsia/Shanghai date --date=3D'TZ=3D"America/Toronto" 2021-11-07 Sun 0= 1:30 EST' Sun 7 Nov 14:30:00 CST 2021 With this, say the user have #+TIMEZONE: America/Toronto at the start of their org file, and they moved to Shanghai, all the timesta= mp in the org file is converted using something equivalent to $ TZ=3DAsia/Shanghai date --date=3D'TZ=3D"America/Toronto" '"$TIMESTAMP" and the file header changed to #+TIMEZONE: Asia/Shanghai when they get back the timestamp is returned with $ TZ=3DAmerica/Toronto date --date=3D'TZ=3D"Asia/Shanghai" '"$TIMESTAMP" shiro --=-qZ3kOWc3lCjbJS1f/gj+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQTCkHM6IDImE32tNiWfTKWZ3AhEnQUCYGg0ywAKCRCfTKWZ3AhE nfubAQDWz60steuWOvubcpaa0hLrLdUNx/KAW0cwRmmnRv5uWgEA7mgAn8lmR2s+ 4hZopng7LiRTCwpRSzW08QkWeBIC2Q4= =gjlJ -----END PGP SIGNATURE----- --=-qZ3kOWc3lCjbJS1f/gj+--