How does the localization of DateTime objects work within Mendix (Project/User timezone vs Local System Time)
If I have an entity with an attribute called DateTimeLocalized where Localize: Yes is set and I display this value on a page, I don’t really see how the project/user timezone has any influence over the display of this value, as the display seems to be controlled by the timezone set on the client’s computer. So say my project contains the following settings: - Project/default timezone: Taipei – GMT+8 - User A has timezone: Dubai – GMT+4 set - The system time on the computer of User A has timezone Cairo – GMT+2 - The project is deployed on a sandbox server in Ireland (so I suspect server time is UTC/GMT+0) I’ve saved the following (UTC) timestamp to the attribute DateTimeLocalized: 2022-02-22 16:22:30. I show this value on a page which user A is currently viewing. The displayed value for User A is 2022-02-22 18:22:30 (which is UTC time + 2 hours; her system time setting; not the one entered for the user. If user A changes the system time to Taipei GMT+8, the value shown is 2022-02-23 00:22:30, which again follows the system/local time, not the setting in Mendix for this user. So what use is setting a timezone for a user when it’s not used when localizing date/time values? Or is this a bug?
Forgotten User Zyrv3wnxJo
In case of localized attributes;
Clientside (UI and nanoflows) use client/OS timezone.
Serverside uses user timeze if set, if not set, then project timezone, if project timezone isn't set then server timezone.