|
From: | Max Nikulin |
Subject: | Re: Two problems with export to Google calendar |
Date: | Wed, 7 Dec 2022 21:00:25 +0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 |
On 07/12/2022 19:56, Ihor Radchenko wrote:
Neil Jerram:X-WR-TIMEZONE:BST which I think was intended to mean British Summer Time; but Google interpreted it as Bangladesh Standard Time. As a result, my events from Org are shown at the wrong time in Google calendar.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 --valueduring 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.
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().timeZoneI have never read .ics file spec, so I am unaware what kinds of name are allowed for X-WR-TIMEZONE.
[Prev in Thread] | Current Thread | [Next in Thread] |