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 AEfZB+rQxGNT3gAAbAwnHQ (envelope-from ) for ; Mon, 16 Jan 2023 05:22:02 +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 ALLcB+rQxGOeQgEAauVa8A (envelope-from ) for ; Mon, 16 Jan 2023 05:22:02 +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 CBD8D39D4D for ; Mon, 16 Jan 2023 05:22:01 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHGzR-0005gW-0N; Sun, 15 Jan 2023 23:20:57 -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 1pHGzP-0005gI-Fe for emacs-orgmode@gnu.org; Sun, 15 Jan 2023 23:20:55 -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 1pHGzO-00055G-15 for emacs-orgmode@gnu.org; Sun, 15 Jan 2023 23:20:55 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1pHGzJ-00025s-IT for emacs-orgmode@gnu.org; Mon, 16 Jan 2023 05:20:49 +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: Mon, 16 Jan 2023 11:20:43 +0700 Message-ID: References: <63c30f34.650a0220.498b8.4573@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: 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=1673842921; a=rsa-sha256; cv=none; b=Vcv6k5Z5mXO6kFeVWzCy7b6Emgl5ALzLEdWCclVH4zeLAAiOZ10Qpjivzu7JUoflINNTFU Kfv4iMPFkoCbVwgZhIwyhng1o+jlPu8LbLWEU/3RTh+s45jBOdJ+6kt7WFWFXvPKML4JCO H6CTDN3lV0q/afOHkwvvW1HsImd4D2BVr5hOrOw/dIBUTmoYwm9nV2FO+LsPQDS1z0yXMA zAytOEwE1s5eT8MAlM2OBCc9Ze1Ame1ky06lgDSIXxGc7AdiZsRpL0T6yeRyfYb8TrGC1Y 9UF7aWpA/+B+ABpwDPAZ6eX9G8AJGpJgCez+RrMhu6i4UWPo2jDbonKZntUqRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673842921; 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=bjZYTn+ZKY8rFafMY2+63Ig6+C9FFwsUGPpGqbHoiyk=; b=OSVZ221QUcQ97FDjMBDcnVDHYrf97/FpsmgHbIPKPZrOxz8A6jmyCerxNsdB6EquiBMnQN An3EilzC2qk5cnZka/iFlCsQBSusyYpGDyMCFMwvj/y2CG6kWBGz9Jk9v4uxmq5m8GJZJK WVQjTjaGKc3jyRDDqGGVmfAs6IVCopR2dsXQ6NxnwbFMWF8HHS+DMFbmh76FJbNBzz1f6V MfTNVJiu4XbGBn8TOZ3g4gOEM5CD2rinD49uhG8PdotX3VUAIQ6jS2vsYhEs080Q5qgyxi L7Zwhp7zGkU+O9yF+q2poAiNTBLu+b+QYHMe2LMFmVkiEwSz/i/sUQjZPL3Vgw== X-Migadu-Queue-Id: CBD8D39D4D 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.82 X-Spam-Score: -2.82 X-TUID: ws8CK+lZyL7E On 16/01/2023 02:14, Jean Louis wrote: > > As PostgreSQL type TIMESTAMP WITH TIME ZONE is stored with underlying > UTC time, so should be Org times also be calculated with underlying > UTC times. Org currently can properly handle the following case: Let's assume that current date is 2022-07-01. A user living in Mexico City schedules a local event at 2023-07-01 16:00 (local time, America/Mexico_City time zone). That day the region had DST active, so current time at the moment of appointment creation has the form 2022-07-01 16:00:00 CDT -0500. Since that date it was decided to cancel DST transitions, so currently (2023-01-16) planned event time is not CDT -0500 but TZ=America/Mexico_City date -d '2023-07-01 16:00' '+%F %T %Z %z' 2023-07-01 16:00:00 CST -0600 Agenda in Org has no problem as soon as tzdata is up to date. As a PosgreSQL expert, could you, please, explain how to handle it in Postgres? 1. Downgrade tzdata to 2022e version or older, restart Postgres 2. Create a suitable table 3. Store "2023-07-01 16:00" America/Mexico_City timestamp using column types you find appropriate for such case 4. Update tzdata to 2022f version or newer, restart Postgres 5. Check that the event is still scheduled at 16:00 in Mexico City I am interested in the table schema, insert and select commands. To check timezone data you may use zdump -v America/Mexico_City Feel free to take another example of tzdata change instead of https://github.com/eggert/tz/commit/2050724fa1144bacb0d35c7cd9b862da858406c4 that I found it in /usr/share/doc/tzdata/changelog.Debian.gz I do not want a regression in Org due to a feature that is intended to improve timestamp handling. I see the point in the Postgres wiki recommendations, but I see their limitations as well. I do not feel that time offset and absence of DST can be considered as a settled state for the timezone I live in.