From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id ED6vORq5wmME/gAAbAwnHQ (envelope-from ) for ; Sat, 14 Jan 2023 15:15:55 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id EPa6ORq5wmNQZwAA9RJhRA (envelope-from ) for ; Sat, 14 Jan 2023 15:15:54 +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 ACDA3298E1 for ; Sat, 14 Jan 2023 15:15:54 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGhJP-0008Ud-Rp; Sat, 14 Jan 2023 09:15:11 -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 1pGhJJ-0008UN-78 for emacs-orgmode@gnu.org; Sat, 14 Jan 2023 09:15:06 -0500 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pGhJH-0002eB-Dd for emacs-orgmode@gnu.org; Sat, 14 Jan 2023 09:15:04 -0500 Received: by mail-pf1-x42b.google.com with SMTP id c85so14773463pfc.8 for ; Sat, 14 Jan 2023 06:15:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:in-reply-to:date:subject:cc:to:from:user-agent :references:message-id:from:to:cc:subject:date:message-id:reply-to; bh=DI1rFBeAldPwPQyFAbiV0X0kzVtVixnaHMpshPvefAw=; b=gwzM8uXyamMo/wUwzcRyr3PgxOScdPJFRc2BbSz2hU+aJYHS+4NSrtxgyFL85BUWIN uwu5U3tMdeQbxqlSTdkmGBnSs335wzoaPcQX0aTkV/Rm2009qP9rbhsSYO8gIhNY46Yo ynjl5ylyeZ0VqLJgICJYGs2dZGpLMrscLrozfFZsD+l4ZXbeP+ewBld3w2IwOPmtdxED 0UmWXlPNVMIKq8Nm5vSR8n5nVX+9knuzCxBTVPF1EwmdEvMp+jhC3fnwffeQrwGAqHTh QS7oxjcrvzwPQS9gmMVo3A/wUPxU2sdkJE5DDmYvp6wjL6hXdQn02gi0SvbiWvLha1UN cQ6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:in-reply-to:date:subject:cc:to:from:user-agent :references:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=DI1rFBeAldPwPQyFAbiV0X0kzVtVixnaHMpshPvefAw=; b=ZmTHccnC+1305HW6pCIOdu1fBGRDFRX0EDsD42Hswg1DWb8ns1qw4eFszS26wyFWDH pEZO7NaTeBmO6NVXHXfXkFGBBFMMJjJDVRu1+Q0glx1pkxhYFOvgYPUwjYg5oyTrRLXF BWZKiUX4TC4ed/+UoTrQ1/zwptv4Kj3Q4IMskpxHTM+D8Zni0ecxRXw8C0ZTvUa7fou8 YB9ZIAT2gow32uK4+J/NxSMeP9ESfaWbqfPOlI6QAjNlTRJ5NaYUioiiZYCcmEHrW5SS ZPbokyQBToVQSs//hNF9Kw7PSzuY42yUfJ82D/gCz1zFh+uutkLI+J3V1l6J2nyzIsiX X3bg== X-Gm-Message-State: AFqh2kp2Cp+w69pSl0dr3PzQmoGeR13/r+UjHT4j4b/LZvG44japL9DW /VE2vbLSWIrABPVJFgP4/EFTYKUnrvM= X-Google-Smtp-Source: AMrXdXu6iRi74kdOugElOdC9xaAnzywgV0KfcP/1A/NJw0z962tck+7D2W3IOCbSb3IUV4MhdAnnHQ== X-Received: by 2002:a05:6a00:1da3:b0:589:d831:ad2a with SMTP id z35-20020a056a001da300b00589d831ad2amr18299049pfw.6.1673705701423; Sat, 14 Jan 2023 06:15:01 -0800 (PST) Received: from dingbat (220-235-140-148.dyn.iinet.net.au. [220.235.140.148]) by smtp.gmail.com with ESMTPSA id y22-20020aa78f36000000b0058d92ff8a31sm19978pfr.187.2023.01.14.06.14.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Jan 2023 06:15:00 -0800 (PST) Message-ID: <63c2b8e4.a70a0220.e3b6d.0051@mx.google.com> X-Google-Original-Message-ID: --text follows this line-- References: <63c287ca.a70a0220.4bd14.873b@mx.google.com> <87pmbh1hgx.fsf@localhost> User-agent: mu4e 1.9.12; emacs 29.0.60 From: Tim Cross To: Ihor Radchenko Cc: Max Nikulin , emacs-orgmode@gnu.org Subject: Re: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda Date: Sun, 15 Jan 2023 01:09:29 +1100 In-reply-to: <87pmbh1hgx.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=theophilusx@gmail.com; helo=mail-pf1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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=1673705754; a=rsa-sha256; cv=none; b=Nt/Ub1h9yZ3oEHolw9uQFqtvpAMDDXA5zrILdVzo8qqB9IovVvJxd4qJBsgc2gGsFWsSTC k1DVu0dLkFlbCXeHsHuYUQxdyFnprOuBBIHzzlXzjWImW+GZDgXl20WODTCoiiJtv8Dk8/ /fOa1pzl07RGxyDEoZcLWVMh0xkgfEeqVyAhpFobXBUWi1rVY8fn2H8WFX3d1kyWrl8IbV +lFrEoqPsymOViAwsMym03Q7rGN4WAGFOu9xwCx7o9IE7lM/6QZ8LD6XfFrHl4ZESYN5QX YMIRf/Nk4qs9TLZBhbKsOhfLsp0KiZu3f9brDJ3Fj/qGjks+U0NfNhTFWJ4Iqw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=gwzM8uXy; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673705754; 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=DI1rFBeAldPwPQyFAbiV0X0kzVtVixnaHMpshPvefAw=; b=HH96//+B7a+Yq8kxpwLupWB/kc69pytrkvjIfJ9ofRrJp4GUEfqoRoSsdWyNBsW922nosF DjZHaNE8Ig88tzPe8IfK13NQorGcL9mTcH3cEhs1Eg0HF0esPzenQkM+ldwHvoTH14A0qF RD6vXvy0Yv0cP/LOvQx9UH9RdjoDgp5cpoy1J+vGkwrquHLOxls1KXALyg0pqxsRv98POp F9F6VxZReHXVwq5fFIOPPLoDST/K+l8OA960luzVR9+Sa2Z3c9Bsr4B2qYQMdrPaW8Ryi0 ChSKRovdGuc185Pr5Y35Dfg6Zglp7oL9aHx6aoWR91Ty5zFDBqdppqYYlqlArA== X-Migadu-Spam-Score: -6.26 X-Spam-Score: -6.26 X-Migadu-Queue-Id: ACDA3298E1 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=gwzM8uXy; 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=gmail.com X-TUID: LghUuFDaYWK5 Ihor Radchenko writes: > 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. I guess we will have to disagree here. If org is going to claim to support time zones, then 100% accurate is IMO essential. As it stands now, we don't claim TZ support and time calculations are correct on the basis they are all done relative to current locale. However, once you add TZ information, if you don't apply it consistently and correctly, that means the values can no longer be relied upon. Or to put it in another way - currently, it is well understood where org timestamps fall down. However, once you add TZ and provide the expectation TZ data will be respected correctly, all bets are off. Anyway, I've made my point and will leave it alone now. Ironically, time will tell us who is right and who isn't.