DateTime.Now fails on Windows with the new Alberta time zone (Sept/Oct 2026 Windows updates)

Sorry this is a bit dense, but it’s a time zone issue, and the details matter.

Starting this week, some of our Windows users in Alberta, Canada cannot launch our app. The app crashes in App.Opening on the first call to DateTime.Now.

Cause: Alberta moved to permanent UTC-6 (“Alberta Time”), effective November 1. Microsoft added a new Windows time zone for it, “(UTC-06:00) Mountain Time (Alberta)”, in the September 2026 preview update (Windows 11) and the October 2026 security update (all versions). Machines with “Set time zone automatically” turned on switch to the new zone without any user action. The Windows key for the zone is “Alberta Standard Time”.

Microsoft added “(UTC-07:00) Pacific Time (British Columbia)” in the same updates. I have not tested it, but I expect the same problem there.

Reproduce: Windows 11 (I tested on 26H2, build 26300.9711), time zone set to “(UTC-06:00) Mountain Time (Alberta)”:

Try
  System.DebugLog("1: " + TimeZone.Current.Abbreviation)
  System.DebugLog("2: " + TimeZone.Current.SecondsFromGMT.ToString)
  System.DebugLog("3: " + DateTime.Now.SQLDateTime)
Catch e As RuntimeException
  System.DebugLog("Error: " + e.Message)
End Try

Xojo 2024r4.2: (which is what I built this app with - I also tested with latest Xojo - see below)

1: Alberta Standard Time
2: 0
Error: Bad Timezone name: Alberta Standard Time

DateTime.Now(New TimeZone(-21600)) raises the same exception, so passing an explicit time zone does not help. Other DateTime calls do not raise an exception, but they silently use offset 0. For example, New DateTime(0) returns 1970-01-01 00:00:00 instead of 1969-12-31 18:00:00.

Xojo 2026r2.1: no exception, but TimeZone.Current.Abbreviation returns “Etc/Unknown”, SecondsFromGMT returns 0, and DateTime.Now returns UTC. On these machines the time is 6 hours off, with no error. I’d argue this is almost worse than the exceptions that 2024 spews, as you have no way to know that the dates are completely wrong.

Has anyone else been bitten by this?

I’ve hacked together a workaround - but I want to stress that I don’t recommend using it as it relies on deprecated calls to New Date(). Let me know if you want to see it and I’ll share.

I had a user report the issue. I thought this info came from the system. But a bug report is urgently needed to make sure a fix is in for r3. An r2.2 is unlikely.

Wow, this is a big deal. Given how common DateTime.Now is, most of us who ship Windows apps will probably need to release updates once a fix is out.

I submitted a report with a sample project:
https://tracker.xojo.com/xojoinc/xojo/-/work_items/82092