Date Localize or not Localize

0
Hello, In my mendix application, I used the date format attributes with Localize at first, and I noticed some differences in the date and time display, and when I changed it to No localize, it corrects the problem, but after a week, I learned that he changed the dates in -1. How can align dates before and after changes. Thanks
asked
3 answers
5

I know this is quite a bit of reading, but I really recommend looking at

this documentation on DateTime handling (https://docs.mendix.com/refguide/datetime-handling-faq)

then you can maybe explain, what you want to achieve.

regards, Fabian

answered
2

When you set the date using the date picker it will set the Time component to 00:00 AM of the date selected.

I.E. When using localize in time zone Amsterdam (UTC +1)  this means that when you select the date 1 febr, the value is 1 febr, 00:00AM localized => stored value is UTC and thus 31 Jan 23:00 

So when you set localized false => all you dates appear with -1 day.

Fix: change all your date values, which are set before changing localize; addHourse($DateTimeValue, [TimeZoneHrsOffSet])

 

answered
0

How did you localise your dates? Did you use the localise date yes/no attribute on the domain model or did you format dates in a microflow? If you used the later and did  not store your original dates it will be a tough call

answered