DateTime.Now crash on Windows

On 1 specific Windows 10 PC in my organization, a Xojo Desktop app utilizing the new DateTime class would crash at DateTime.Now. This was found during a Remote Debugger session. The error is “Xojo.Core.InvalidArgumentException” with message “Bad Timezone name”.

On the system that was not working, I went to the Windows 10 Time Zone settings and it was set to “Central Time (USA and Canada)”. I changed it to “Central America” and the Xojo app no longer crashed. I then set it back to “Central Time (USA and Canada)” and the Xojo app still works without crashing. Go figure.

I am posting this on the forum in case someone else runs into this.

That is certainly worth a feedback note. make sure to report it so that it is fixed in an upcoming release.

I winder if this is related to the oddity where if you used UK 24 hour format settings the IDE would misbehave but if you used 12 hour it was fine
Danged if I can find the case # for that

Xojo Framework on Windows is known to have quite some issues with Localization… This one reminded me of <https://xojo.com/issue/51602>. It could be something similar (InvalidArgument - wrong/unexpected Date-Data)

I’ve seen that, too… Every now and then a customer is asking us: “Why do you format the Dates in English, even if my System is set to ‘German (Switzerland)’?”
We then ask to change the Region settings (which affect the Display Format for Date/Time) to “English (US)”, and back again to “German (Switzerland)”. And go figure… now the very same Xojo built application shows the Dates in the expected localization.

It seems to me like a mix of some things not quite proper in the Xojo Framework, but also an issue on the Windows/OS side.
In your case with Timezone-Settings and DateTime, in our case with Localization and Date.

The mean thing is just that there is no way to make this a “reproducible feedback case”…

[quote=464362:@Norman Palardy]I winder if this is related to the oddity where if you used UK 24 hour format settings the IDE would misbehave but if you used 12 hour it was fine
Danged if I can find the case # for that[/quote]
Have you been thinking of <https://xojo.com/issue/58122>?

that would be the one