I have a project that needs to allow users to select their own timezone. So I downloaded the official timezone data files from: https://www.iana.org/time-zones
Once I had all the time zone names incorporated into my application I stumbled across two timezone names that caused a “Bad Timezone name” exception:
There may be more that cause errors but I haven’t tested every one (there’s about 420+ timezone names).
So, Why would the Xojo.Core.TimeZone object choke on a couple of official IANA timezone names?
These also cause an error:
[quote=420028:@Ralph Alvy]The list Xojo supports is referenced here:
Link is broken (parenthesis at the end is truncated).
But, I found the Xojo page you indicated and it links to Wikipedia. The Wikipedia page lists the problematic time zones. So there must be something else going on here. If I try to create a timezone object from any of the timezone names I listed above, I get a “Bad Timezone name” exception even though the Wikipedia list shows them as legal timezone names.
I am using Xojo 2017 Release 1.1 if that makes any difference.
For what it is worth: Using 2019 r2 and the DateTime class, I did not have trouble with any of the “bad” TimeZones that I sampled from your list. I sampled five.
@Wes which OS and Xojo version?
I do not have any problem with MacOS Mojave either.
The problem is with Xojo 2017r1.1 using Xojo.Core.Timezone