Date Issue On changing locales

Greetings,

We have an app that handles ok on desktops but more and more recently most of the users opt for laptops and it seems that when traveling the date part gets messed up. Is there a way to avoid that or to fix that ?

all the records in the database, SQLite And MySQL are saved as date Field, so we had a customer that travelled in Asia and all the dates that were created while there changed from 2019-05-27 01:55:55 to 2019/05/27 01:55:55 and messing up all the other side of the app that was processing the date side.

For date generation I’m using the simple Date method not the Xojo.Core.Date

The creation of the date is something like :

rec.DateColumn("orderdte") = New Date

and the processing is mostly :

contentSet.field("orderdte").dateValue

but on the other side when getting that date is crashing the app and until I delete and change the date to the right date it does not work.

Thanks.

You need to set Date.SQLDateTime value and read that back

Well that was my feeling as well. I guess I’ll have to update the code all over to avoid this.

Thanks.

While I agree with the previous poster that you need to make the date handling more robust, I would point out that the locale on a laptop does not change just because you are traveling. There is no magic involved, some body switch the locale for some reason. Most likely to import or work with a local file they were given.