What changed? A peculiar problem

I have an application that operated fine in this environment:

Raspberry Pi 3
Buster OS
Xojo application compiled w/Xojo Version 2020r2.1

Yesterday I recompiled the application with Xojo Version 2025r2.1 and the application errored when starting. I tried for several hours to track down the problem and finally determined that my application was crashing on this line of code:

Var Now_dat As DateTime = DateTime.Now

The error was this:

An exception of class InvalidArgumentException was not handled. The application must shut down.

Exception Message: Bad Timezone name: posixrules

The only thing that changed was the use of a newer version of Xojo. I spent the rest of the day using ChatGPT to try and figure out how to fix the issue. Finally, ChatGPT offered a fix:

sudo ln -sf /usr/share/zoneinfo/EST5EDT /etc/localtime

This fixed the problem but left me uneasy wondering why this issue happened in the first place.

I asked ChatGPT to provide a summary of the issue and it delivered this (if you are interested):

I dug into it, and I think we can now explain the whole sequence with considerably more confidence.

The short version: your Raspberry Pi’s timezone configuration was not newly corrupted. The America/New_York → posixrules arrangement is an old, legitimate Debian/tzdata design. What changed is almost certainly the Xojo runtime’s handling of the Linux local timezone, not the Pi’s clock or timezone configuration.

  1. Your Pi’s posixrules arrangement is legitimate

This was the part I initially misdiagnosed.

Debian’s tzdata has historically generated posixrules as a link to America/New_York. The tzdata build configuration explicitly says that America/New_York is the default template for POSIX-style timezone rules.

In fact, Debian’s documentation/manpages describe:

/usr/share/zoneinfo/posixrules

as the timezone file used for certain POSIX DST rules, and say that it is normally linked to the America/New_York tzfile.

So your original:

/etc/localtime

America/New_York

posixrules

wasn’t some bizarre corruption that happened recently.

  1. Your installed tzdata hasn’t changed recently

You have:

tzdata 2021a-0+deb10u3

Debian’s changelog confirms that 2021a-0+deb10u3 was released in October 2021. Subsequent Buster updates existed, including deb10u4 and deb10u5, but those updates were for specific timezone/leap-second changes—not a fundamental change to how America/New_York works.

So there’s no evidence that some recent tzdata update suddenly caused this.

In fact, your Pi’s timezone files have timestamps from October 25, 2021, which fits that story perfectly.

  1. Linux itself is completely happy

We proved this experimentally.

Linux:

date → EDT -0400
timedatectl → America/New_York
Python → (‘EST’, ‘EDT’)
Python DST → 1
Python localtime → correct

So the OS timezone subsystem is functioning.

  1. The smoking gun is Xojo’s exception

Your Xojo program produced:

InvalidArgumentException
Bad Timezone name: posixrules

That is extraordinarily useful.

Xojo’s current documentation says:

DateTime.Now(timeZone As TimeZone = Nil)

and explicitly says that when the timezone argument is Nil, it uses the device’s current timezone.

Therefore your:

Var Now_dat As DateTime = DateTime.Now

causes Xojo to discover the Pi’s timezone.

Somehow, on this Linux configuration, the Xojo runtime is discovering:

posixrules

instead of:

America/New_York

and then attempting to create a Xojo TimeZone named posixrules.

That produces exactly the exception you saw.

  1. There’s evidence that Xojo’s timezone handling has had problems before

This isn’t unprecedented in Xojo.

There are reports of Xojo throwing Bad Timezone name exceptions when its runtime encounters OS timezone representations that don’t map cleanly to the timezone names Xojo expects. One 2019 report involved DateTime.Now and a system timezone configuration; another Xojo discussion specifically describes problems when a system timezone name isn’t one Xojo recognizes.

There’s even a much more recent Linux report where a Xojo application complained about:

Bad Timezone name /etc/localtime

even though /etc/localtime pointed at a perfectly legitimate IANA zone such as America/Chicago.

That makes your experience look much less like a damaged Pi and much more like a weakness in Xojo’s Linux timezone discovery.

So what actually changed?

This is the one part where I want to be precise.

I cannot find a Xojo release note that explicitly says:

“Changed Linux DateTime timezone detection and now follows /etc/localtime symlinks to posixrules.”

The 2025 R2 release notes don’t document such a change.

Therefore I don’t want to claim that we’ve proven a specific Xojo release introduced this bug.

But we have proven the behavioral change:

Previously

Your old Xojo runtime:

/etc/localtime

America/New_York

posixrules

didn’t cause a problem.

Now

The newer Xojo runtime:

/etc/localtime

America/New_York

posixrules

Xojo interprets “posixrules” as timezone name

InvalidArgumentException

And when we changed only:

/etc/localtime

to point directly at:

/usr/share/zoneinfo/EST5EDT

your unchanged Xojo application immediately started working.

That’s a very strong causal demonstration.

Why did EST5EDT fix it?

Because EST5EDT is an actual tzfile:

/usr/share/zoneinfo/EST5EDT

rather than a symlink whose final component is:

posixrules

So Xojo’s apparently simplistic discovery mechanism no longer encounters the string posixrules.

The underlying timezone rules are still Eastern Standard/Daylight Time, so Linux continues to report:

EDT -0400

and your application gets its DateTime.Now.

One interesting wrinkle

There is actually an even better clue in the current Debian tzdata source.

Modern Debian’s tzdata build process deliberately creates posixrules as:

ln -s America/New_York …/posixrules

and Debian’s own source comments acknowledge that POSIXRULES is an old/obsolete mechanism.

So the Linux ecosystem has been moving away from depending on posixrules, while your Buster installation is still using the old arrangement.

That makes the most likely overall explanation:

Your Pi’s old Buster timezone database was perfectly valid, but a newer Xojo Linux runtime became less tolerant of the old posixrules representation.

And this explains the timing

Your application could quite reasonably have run:

2017 → 2025/2026

without a problem.

The Pi didn’t necessarily change at all.

You eventually rebuilt it with a much newer Xojo runtime, and that runtime encountered an old-but-valid Linux timezone arrangement that the older Xojo runtime had tolerated.

That’s why it seemed like:

“It has worked for years and suddenly the Raspberry Pi is broken.”

It wasn’t actually the Pi’s clock that broke.

It was the interaction between an old Linux timezone representation and a newer Xojo runtime.

I think your current fix is perfectly reasonable

You’ve changed:

/etc/localtime
→ /usr/share/zoneinfo/EST5EDT

and your Xojo application works again.

I would leave it that way rather than changing anything else. We now have a working configuration, and there’s no reason to disturb it.

So, what actually changed in the time between Xojo 2020r2.1 and Xojo 2025r2.1? Is this something that needs to be addressed or is Xojo 2025r2.1 simply not going to work with Raspberry Pi Buster?

Very interesting. By any chance, is the 2025r2.1 a typo that should’ve been 2026r2.1??

Did you, by chance, happen to install the later version and then uninstall an earlier version, like I myself did with installing 2026r2.1 and uninstalling all previous versions?

I am wondering if some kind of dependency upon a common resource caused silent failures in my project failing to load in a computer where I removed previous versions of Xojo after installing r2.1 version.

One of the first lines of code is that DateTime.Now assignment to a DateTime var. And my project makes extensive use of that particular line of code within multiple methods.

My development environment is Windows with build targeted for Linux web app servers.

Looks like you should upgrade your OS to a newer one, as RPi Debian Trixie

Or start to document workarounds to OLD OS versions as you found.

What seems that changed is that newer Xojo versions are following current standards that old OS as Buster don’t follow.

It’s not a typo. I am using Xojo 2025r2.1 as I haven’t yet upgraded to the latest Xojo version.

All of my Xojo work is done on the Ubuntu 24.04 platform and my Raspberry Pi 3’s are the deployment target.

Using this:

Var Now_dat As DateTime = DateTime.Now

works fine on my Ubuntu system. But when deployed to the Raspberry Pi 3 (Buster) system it fails.

At this point I have to assume that this is a Raspberry Pi 3 (Buster) issue.

Upgrading the Raspberry Pi OS might seem like a no-brainer but much of what I rely on for my application has been made obsolete in the later versions of the Raspberry Pi OS. In particular the OMXPlayer. After having looked at several other Audio/Video players, I’ve not found one that was even close to the OMXPlayer. I am currently exploring the MPV player as a possible replacement and so far it looks like it might be able to fill the shoes of the OMXPlayer but I haven’t completed all of my testing.

The reason I documented the issue and posted it here was to find out if this bug had been reported and corrected or if the Xojo developers had made an alteration to Xojo which prevents Xojo from remaining compatible with earlier versions of the Raspberry Pi OS. And as you said, what seems to have changed is Xojo but I can’t find any mention of that change so this puts Xojo users who target the Raspberry Pi (like myself) in a very awkward position. We have no documented reason why our code has broken and we have no documented work around if our code needs to remain on an older Raspberry Pi. I’m just looking for clarity from Xojo corporate.

Seems not a bug. Just a deprecated feature removed in modern OS versions causing a bad behavior in modern code/compiler. If you want, your installer (or companion helper) could detect the presence of such condition in older systems and offer the user the option to upgrade the OS and try and gain, then quit or your installer could offer to apply a patch to the OS, the same patch you did, probably.

It’s more like you said, a peculiar problem.

The release notes for Xojo 2025r2.1 mention:

Raspberry Pi ARM32
Pi 2 or later running Raspberry Pi OS 11 (Bullseye or later)
Raspberry Pi ARM64
Pi 3 or better running Raspberry Pi OS 11 (Bullseye or later), Debian GNU/Linux 12 (Bookworm or later), or Ubuntu 20.04 or later

no mention of Buster. Is Buster later than Bullseye?

Thank you for pointing that out! Yes, Buster was the version prior to Bullseye. There is no mention of the particulars of what changed but it does look like Buster is no longer supported. Fortunately, the Raspberry Pi 3 is still supported.

It looks like I’ve got a lot of work ahead of me to migrate my app to the latest Raspberry Pi OS. But at least I am now discovering all of the various components of my project that need to be addressed.

Thank you!