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 SAhxOVuSwmNkiAAAbAwnHQ (envelope-from ) for ; Sat, 14 Jan 2023 12:30:36 +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 4K16OFuSwmNpEwAAG6o9tA (envelope-from ) for ; Sat, 14 Jan 2023 12:30:35 +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 B4F89167A4 for ; Sat, 14 Jan 2023 12:30:35 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGejq-0000yE-RH; Sat, 14 Jan 2023 06:30:18 -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 1pGejg-0000xg-3b for emacs-orgmode@gnu.org; Sat, 14 Jan 2023 06:30:11 -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 1pGejc-0005ye-BC for emacs-orgmode@gnu.org; Sat, 14 Jan 2023 06:30:07 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 7F08F2401FC for ; Sat, 14 Jan 2023 12:29:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1673695795; bh=UYQ9G/2NNB+FsnmmXygduYO6Q45hftM25xJz2/KMe+E=; h=From:To:Cc:Subject:Date:From; b=pyGBzSK7j5oWIMj4lluAo0Y+1Jhw9JwPw5X0n1w4k+pQPlcPD0K9XQi5gSwkdnZO7 uJpG9H9fxuiO94NaOOg9EWIUjTUrpHPlpNXgRb8atdB9EUI/FtBsDmJfh2ryNgScR7 yMbHY6KSeeCpy/cBsSItHhbVIGhyENUmLaTjl4B9sggWdqw2YR4jNLvtyaUQ8PiKWI qfAM6cTM28aZ65Z9lMmIQQbk+CG3kg6bavuN9hICZpIdAey/WBr6LPTjaC23vMQwdS 5SXORfNXunEfpjz2jTserjxwyKSs/bxjMD2yrPj8x1rtGAHhsoyFM8U2nAGlU6Q2Kh karatSag2n8vg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NvGKX1M6Cz9rxB; Sat, 14 Jan 2023 12:29:51 +0100 (CET) From: Ihor Radchenko To: Tim Cross Cc: Max Nikulin , emacs-orgmode@gnu.org Subject: Re: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda In-Reply-To: <63c287ca.a70a0220.4bd14.873b@mx.google.com> References: <63c287ca.a70a0220.4bd14.873b@mx.google.com> Date: Sat, 14 Jan 2023 11:30:22 +0000 Message-ID: <87pmbh1hgx.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-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673695835; a=rsa-sha256; cv=none; b=XaG8RWQxVD7CMhg6u+kYQXok6+LtGmLLx2mvYfFAk+4y6pn+9IeNrbZc8oN0PC1DHJ5hmy T0Ysv/iR/EnMjtQVmPhEuyA1+JtHlR/2l/F4YnyA56aDwwhdIRPqNmwm9nl/KHqjeaIUFW 46UbDiAMJLvoUKsPA/XrniMEUERI7lJA+iQ4RAW/nyyzYY+Q9BbleJsJTOe9aAkMbno1Y8 Lj6hqCUZwDRq3yZwVydum+NDm7tuj2IgQiJWQLN409IypNHwZ5nFQenmJzoekwr8sU8ToK cbbjpnAf+x80QnRXRlBLu+Yjh+L+6NFQ/z8L5rPwnOYYv5WXJedoaV9w4nNfmQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=pyGBzSK7; 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=1673695835; 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=Y3HbB3+0GHq24C/NKCxZTRqj1g4kj7tagv4Gub4wRa0=; b=BfsF33oBwYH8y0BHVqil8ncdAyRtzp+9U/44dREiDqUS48mMfJDeamzX49HbPR4hQ2piVq Wd72mimxJ55rrq2SR1BVmPBJXZ1WRGAJl8jDJ4b7aBe7Edye+z6qJLeiBmX8bm8jsav3cM FxXO/Hw49sceTz1Pyko8tJ/lfVgZuYfOuovy6yeq/xnd7xn/5ES21kbT8tzml0w26xs5EB vfsNfXdMdiMjEOisfI2gSqyH7XrKGKGTgL16HwWCVS8Pw4pvVXcf59dDKOPof9EAK/T8K+ MiXxnqmOFUB+qvP6EudpEHKpLg6fXni4pV+X7sALskfnEx5v/y9NXlfkxIdMMg== X-Migadu-Spam-Score: -6.05 X-Spam-Score: -6.05 X-Migadu-Queue-Id: B4F89167A4 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=pyGBzSK7; 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: kzyhTDxykSMv Tim Cross writes: > Daryl mentioned elsewhere in this thread that how hard this feature > would be depends largely on the available libraries for elisp with > respect to working with date/time values. Sadly, the available elisp > libraries are inadequate in this area. While many of the functions can > be called with an optional argument defining time zone information, > there is no library which can retrieve this information in a consistent > manner and which supports historical data lookup e.g. what were the DST > transition dates for NSW Australia in 1970 (trick questions, NSW didn't > adopt DST until 1971). The existing library functions are focused more > on simpler time calculations where time zone information is less > relevant i.e. running timers, timing command execution, comparing file > modification times etc. Sometimes, it is easy to forget that while Elisp > is powerful, it isn't really a general purpose programming language like > C or Rust or even CL and Scheme. It is primarily a programming language > focused on a specific domain, the editor. While it has some great > libraries it also has anumber of areas where it lacks the sort of > sophistication we have grown to expect with more general purpose > languages. Emacs' own time zone support is relying on external libraries. AFAIU, historical context should be handled no worse than in the OS. More precisely, tzlookup from timefns.c relies on time.h and Windows equivalents. All the heavy lifting is done by core OS libraries. > A further complication is that accessing date and time related data is > very system dependent and there is no high level library which abstracts > this so that you can easily get consistent results across all the > platforms Emacs runs on. Even the underlying data type can vary greatly > (i.e. some platforms use a 64 bit value while others only use a 32 bit one). This is not the problem we need to worry about. We can use whatever Emacs provides and rely on future improvements in Emacs where things are deficient. We should not aim for 100% accurate time zone support. Just good enough. It's not Org's job to implement the gory details of time zone support. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at