From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qOQ/Hwz7ZmCZVgEAgWs5BA (envelope-from ) for ; Fri, 02 Apr 2021 13:07:56 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id uKkgGQz7ZmCJMQAAbx9fmQ (envelope-from ) for ; Fri, 02 Apr 2021 11:07:56 +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 1A835D49F for ; Fri, 2 Apr 2021 13:07:56 +0200 (CEST) Received: from localhost ([::1]:39902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lSHec-0006be-QW for larch@yhetil.org; Fri, 02 Apr 2021 07:07:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRQWV-0001wT-3Y for emacs-orgmode@gnu.org; Tue, 30 Mar 2021 22:23:59 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:37847) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRQWT-0006pr-0k for emacs-orgmode@gnu.org; Tue, 30 Mar 2021 22:23:58 -0400 Received: from [192.168.1.31] (unknown [221.217.51.204]) (Authenticated sender: shironeko@tesaguri.club) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 8BEFF200007 for ; Wed, 31 Mar 2021 02:23:47 +0000 (UTC) Message-ID: <1582684563de8d8c9aad7da62757ae77ea93972a.camel@tesaguri.club> Subject: Idea for handling timezones From: Shironeko To: emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Date: Wed, 31 Mar 2021 10:23:44 +0800 MIME-Version: 1.0 User-Agent: Evolution 3.38.4 Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=217.70.178.232; envelope-from=shironeko@tesaguri.club; helo=relay12.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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 02 Apr 2021 07:05:54 -0400 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: , 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=1617361676; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=9KjPx1DCV85a9WeeZxw6uXyWkoAfXPnv0kW2llD4luw=; b=EaPGxkQ3Pbx2R7BUMpn+66OlbfCppLkY6/36EPJuLaovxTlNTfvYmivhg1GVJLaB/1v0IK CvgNgQ8sCAr505Ylj1ivrlNPm4LUdeaDcY1OEv/cGuTKU/RRm9h8QApQpztoO4uWl/1Mx9 QogFEV21y+oAQ9RgoULZK3Ch907VF6HHFwX9DKdYsdNu8N38fFWZviP9la1L8SCoeuhVT+ wweSDGl9dp+BNvlALF1Jr11G9oL/A7AnD3uPuEvepa/CAoiZKeGHGBMZPBvs5KPse0JjfO W8ANuZC6XFR+adHy0i7UjVhOTtLQBJ2BKEPPf3TBTMnmVpipZjAyLALR89h3lg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617361676; a=rsa-sha256; cv=none; b=K4Gv8iN67+bDhi807QgDqkXFprQc+XTJCjf9XbqOeJQMe2V9Q5L6F2+vSZnCccIs3pS+K+ akJvDv5iwp5iXB1d7Fu2MWxI3xUXSmB8b2EgS5C4/JewS+wC4wuXnJrZJixuAjgFcUlTe3 c0u/6rDPfZ1cwINz/h73n1AqlqWYT7g8NP9z5hwzIcOeAnQaukOk0aucZnwAZBOoj7RSTW TwTdQassCm1CR1SD6wNgwoxWPTQcyCHcBsEytRv9hwzkxB5Gw2ykKR4TcESnaaz4w9Urne /jWZQWiH7RobtIWJR5LBLhWz4IDGgD2eTjAT2WJsHEj5Ene5tNy5eAxLkREQ2A== 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: 0.07 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: 1A835D49F X-Spam-Score: 0.07 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7eAd8YMrO1Fp 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). This change would be backwards compatible, and it should do the job well enough. Regards, shironeko