Question: I have a date and time attribute in my entity that gets its value from a date picker widget. When I localize the attribute, I notice inconsistent results depending on the system region. Here are the specific observations: In the India region, the localized date/time is consistently set to 18:30:00. In the Japan region, the localized date/time is consistently set to 15:00:00. If I don't localize the values, they remain at 00:00:00 for both regions. I'd appreciate it if you could help me understand why this is happening. Specifically, I'd like to know if there's a default behavior or setting in Mendix related to localizing date attributes.
asked
TUSHAR BOHRA
1 answers
1
Hi Tushar,
have a look at this learning path. Mendix really goes into detail explaining how localization works for datetime attributes.
Short answer: Localization translates your selection to UTC value with the time difference and saves it in the database. If a different time zone is used it gets translated to a different value. Therefore when localization is turned on, the values change if the time zone differs