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 WGVeEVk0l2NmjAAAbAwnHQ (envelope-from ) for ; Mon, 12 Dec 2022 15:02:01 +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 8IJOEVk0l2POVQAAauVa8A (envelope-from ) for ; Mon, 12 Dec 2022 15:02:01 +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 55F3615832 for ; Mon, 12 Dec 2022 15:01:48 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4jMg-0001fJ-37; Mon, 12 Dec 2022 09:01:06 -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 1p4jM0-0001NX-HU for emacs-orgmode@gnu.org; Mon, 12 Dec 2022 09:00:27 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4jLy-0000G1-Ew for emacs-orgmode@gnu.org; Mon, 12 Dec 2022 09:00:24 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 92D99240028 for ; Mon, 12 Dec 2022 15:00:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1670853620; bh=BQ2Xq0MC6RIgUhx7iO7ntGUb63XKVT72rvOWuFVlO3o=; h=From:To:Cc:Subject:Date:From; b=Frx6NjxDQ/GKkIJJmTaTrB3F2UBA3AVIUByplKQnP5e2cOoVugCCpyygURkoE93+Y yEAeqzI5hEEpPw4KJCmhQU4OmGlrIJlwFvTAg5CRWrWl1TknY49QjPAoR7FtcsJTRU wXOCASIsuf0dmzZi46kABe/btuJX+e4n/gkj4clS5+4KBGy/RlpnHivZSMOtZGdA0x UFUDh3GNOKlP8mX+V8AdO2U07KkJnGSS8kJcXIoKI43YMQ+fgxA73NAAGb8JBUeg7C tfAtcxNWbD/ee4nIfy99CDSrvhrfjqG1+RYRosSKQnEtq9JYasferW6oxmQalKVDGr i1NIQIM6FhNXQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NW3DM3brFz6tmL; Mon, 12 Dec 2022 15:00:19 +0100 (CET) From: Ihor Radchenko To: Max Nikulin Cc: Org Mode List , Neil Jerram Subject: Re: Two problems with export to Google calendar In-Reply-To: <85f7d530-5d76-4bf5-7225-40d7e3011d0e@gmail.com> References: <877cz3l6cl.fsf@localhost> <85f7d530-5d76-4bf5-7225-40d7e3011d0e@gmail.com> Date: Mon, 12 Dec 2022 14:00:18 +0000 Message-ID: <87sfhkg1sd.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670853708; 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=LPJcu3HWsx+j4wLM0Cp2h/430AHqr6BykUWigsKP2LA=; b=dsKQH+KSXEQeXoHAknWRWTlQzdy5WwF+lpYUiB/dQhoT4uHbnafrT5IA2NxgwYwUHx7OF9 JKzbhiNe1KHA/82ABU5ru6qgQOnaefwuqnKax1BO+dXsu08dpx34+KnlRX0oZFyKBjElAE Vte5N+kIKGwW2G8utqpbUKRaaLOaAxmcvl/THsC94H1oOZxDQ67Xc6LZNp6+HF3gtZrMhw fE8ROuMfIPb13n7hvmLzA8JvP/wNh6LFo1NAeUiFITC3qwen5q2/wR5yEns6Va7tdbbc2T nQB5jP5nGafM8F4pmxPJuCPC8g4iJ57f5A4DEeDLL7WmBUi1A+c3KirOaKdhdQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Frx6NjxD; 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-Seal: i=1; s=key1; d=yhetil.org; t=1670853708; a=rsa-sha256; cv=none; b=tzzcQaUaXrDlqH3JKd/Mfban9fiSMzqd0SSYg6AhCFWUz1DgQz82FM+Pn7ZpsySQd2fNaQ HO1PWHcWYVfooFNhPcr6KP0DKhjWimCgjly3cb7QAf0oPVsaN7ZedpLt+dCZwI8y5ZSoxW +u/QEWqlTG7LUzMA9OX9vlT0lhylRZp8dVNsuMih4aKhiVyjqb0rH58J/A/PdkB+IfF5uE RtBKYjkr4sbVpoJ5+/2KRjGIXrYgllQaquIxod7R7zg9KTss6uKTBnsY2Les6hWpbJpVy3 jvVb5cvQKtH5d7816vXCHV7zc+01q8UwMKrEYKzp3+G9Ow/9+kKdkr74waBs+g== X-Migadu-Spam-Score: -11.45 X-Spam-Score: -11.45 X-Migadu-Queue-Id: 55F3615832 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Frx6NjxD; 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: AYF2uTsM+nBm Max Nikulin writes: >> By default, ox-icalendar takes the value of your TZ environment variable. > > I think, in most cases TZ is not set, so (format-time-string "%Z") is > used to get abbreviation (that is ambiguous). > > On Linux we may try > > timedatectl show --property=Timezone --value > > during generation of export template. There is a chance that init system > is not systemd, so the command is not available. It is possible to get > timezone from /etc/timezone, but the code would not concise since it may > be a text file or a symlink to the definition. I have no idea concerning > macOS or Windows. According to POSIX standard (https://pubs.opengroup.org/onlinepubs/9699919799/), we need to use "TZ" environment variable, when present. Otherwise, fallback to defaults. This is exactly what ox-icalendar does. If TZ is set, use it. Otherwise, use `current-time-zone'. > Emacs relies on libc to handle time zones, and there is no API to get > the identifier. I miss the option available in modern browser JavaScript > > new Intl.DateTimeFormat().resolvedOptions().timeZone The issue in this bug report is that TZ is actually set. Ambiguously. In OS. We cannot do much about it. Outsmarting system settings is not a good idea. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at