Xojo 2023r1.1 valid GMT UTC timezone offset for Mexico City

It appears, at least on Windows 10, xojo 2023r1.1 reports a GMT/UTC timezone offset of -5, instead of -6.

Var tz As Timezone = New Timezone("America/Mexico_City")
System.Debug tz.SecondsFromGMT // prints -18000 (-5 hrs).

There is a bug report for this:
#73143 - DateTime for Mexico still gives DST in Windows even when the hour change was removed

Too bad the fix will not be in Xojo2023r2 but until r3

Looks like Xojo API 2 uses a HARD CODED list of offsets, and they havent updated it to have the new timezones in Mexico.

You have to wait until xojo updates the list, then more months to the new release, and then you have to recompile your app…

Or dont use API 2 and look for alternative code.

Thank you for the rapid response. I would have assumed (hoped), xojo went to the O/S for this info (which ideally MSFT, APPL, are updating tz info pretty promptly), so I’m a little surprised. I get it though, time/date/timezone are hard.

MacOS does not show this problem. I don’t know about Linux.

Thank you for reminding me it’s not present on MacOS. I just tested on Linux (Ubuntu 22.04) and the problem is present for Mexico City (reports UTC -5 instead of correct -6).

1 Like

I think they did on API 1, you can still use it:

I guess I don’t understand how Date API 1 helps me here as my goal is to start with a time and date (lacking correct offset) and timezone abbreviation, to determine the GMT/UTC offset explicitly at that date (so ‘knows’ DST rules for that date at that tz).

Xojo 2023r1.1 is using a VERY OLD and now useless ICU data

ICU v65.1 from 2019 intended to handle global data for the first half of 2020

ICU libs needs updates twice per year to receive the never ending global changes.

We should be using ICU 73.2 now that includes the most recent CLDR43 (Unicode Common Locale Data Repository)


Thank you for pointing to the more detailed and helpful discussion on this issue, including the Windows (and as I’ve noted, Linux) behavior for Mexico City not seen on MacOS.

Probably MacOS update the CLD online. Windows 11 probably also do it but Xojo does not use the current Windows ICU, but a stand alone lib from Xojo. There’s a request for Xojo to use the Windows integrated one. I hope we can have the option to choose one or another in the project options so we can send a fat install in some cases of an outdated offline OS.

That’s a great suggestion to make it a project setting for xojo to include ICU info or rely on the O/S during execution of the application.

1 Like