From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 oEYRDSm8x2PJKgEAbAwnHQ (envelope-from ) for ; Wed, 18 Jan 2023 10:30:17 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id GJTsDCm8x2N/3gAAauVa8A (envelope-from ) for ; Wed, 18 Jan 2023 10:30:17 +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 BE6A4DB99 for ; Wed, 18 Jan 2023 10:30:15 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pI4ks-00042Y-Ag; Wed, 18 Jan 2023 04:29:14 -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 1pI4kp-00042L-Sq for emacs-orgmode@gnu.org; Wed, 18 Jan 2023 04:29:12 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pI4kn-0001Il-0X for emacs-orgmode@gnu.org; Wed, 18 Jan 2023 04:29:11 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 6E52B24046C for ; Wed, 18 Jan 2023 10:29:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1674034146; bh=QZBOKwmklXyz9T/N0qnRnQIwu8/h0lGN4q7pvYaH82s=; h=From:To:Cc:Subject:Date:From; b=CeX6V2sk3T8cjtJ7TwlcSfQNW3wZDMAdZ328j3+C4Q0k68zv6WlhxC+isN4Ldl+zb ShYNslk4VsRgg6XRGxwazFb8OLGAspIyzqg2VvVc7/Kt7PqFSnqvaMS0ctk/+cBSHB b6v1gj50x/0gQgnLPc4KnBgrDIUdIZgbvW1aVabD+nErMCGDNzN6MSbGDn0Uz7O2+Z arJ2a6QC6rf/9C/qT2tBCjS9xW15GNtMy0X7kYYWjyeT+DaOEQGg4oMETaesgpjIKT eBJXNyMYgtJhZN6CqqdCd9fndRjpYTK6h9J7yUKWX5kmhZ4MF76yqQ4kJjhTLTG/m/ xPjVUZCXdLiZw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NxgSK3MShz9rxL; Wed, 18 Jan 2023 10:29:04 +0100 (CET) From: Ihor Radchenko To: Jean Louis Cc: Daryl Manning , 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> <63c2aa9e.170a0220.3bb49.9ef4@mx.google.com> <87pmbhz1x6.fsf@localhost> <87wn5mlo7f.fsf@localhost> <87pmbelnd0.fsf@localhost> <87fscajo2q.fsf@localhost> Date: Wed, 18 Jan 2023 09:29:37 +0000 Message-ID: <87a62g8a2m.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.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, 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-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-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674034215; 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=kelCofbkvRWHAY5q7SkraGFE+ikRTk/ohEVjXMJfsE4=; b=HdjWA7A8GNY8b5wN61k76B3zc9ADfDUVKutHeI6jqHioztq+Fge1yWSZBlhpTSw4B71Hyr 5CaAE9xK3dG9X0lUi6vLz2lya/oNdQdITa28Q1EoyQEECQrpTOHoxIhg0X25sKHkg9mbgW UEmgziQDshw/ns6qxQxxbc3CKXK+eJGKeR7eFPXQ4acbPtxhIJsZJi6bhmf2U2e1NnW3MV j7f0MIzdqORJX7EXDWEMd3bv9rYdoZNWLDit4VKwZXp+OB9tXWMEl/dFbYnvgWdVMlPW/0 /2GLoKTYSAtzqwfsgmhCCZD8fya+DemZA2BqqhovN1YPQNCqsRWo6HPK2SJKWA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=CeX6V2sk; dmarc=pass (policy=none) header.from=posteo.net; 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-Seal: i=1; s=key1; d=yhetil.org; t=1674034215; a=rsa-sha256; cv=none; b=YwQaarKT0nA31o+qvqtIZwCvAfqmjKwVYQrdyG2nueqr5L0im2l5EwxO3hguwTgl8wLlPe qnGUjL7DHAIYTkpZN3AnCGiAgMLQzs/TOfeCh9kLaWHYssk1lctdl5QNtG3aIvAbcA5VUa 0m8JVSTWv4DtmUqvh5+Ni42dVbHx515I3H3bvCh9+QzPPmZ4jHU0Uv9emSwJVA38+h5Tyc QHR87qZXJpBHNWy6deXJsC6EF+rvnU7F0hg54d3zNkNOzm5Gn9fdr0jFxvJp+AoPgRBcrH DkfPkajZCG0jnGwuvePDtvKIrW6djpjLJFe84qLF0rj8Wyt1b49SSTYPIq7jcQ== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -4.58 X-Spam-Score: -4.58 X-Migadu-Queue-Id: BE6A4DB99 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=CeX6V2sk; dmarc=pass (policy=none) header.from=posteo.net; 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-TUID: LNqYlyWoIEcu 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)? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at