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 --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.

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

I have never read .ics file spec, so I am unaware what kinds of name are allowed for X-WR-TIMEZONE.

Reply via email to