DatePicker: time zone of date entered is mismatched

1
Hi Team, I have created an attribuite of datetime in an entity. Currently is localized. When I enter a date (eg. 21-10-2016, 12:00 PM) from UI it shows me current date time (Amsterdam), but it saves in the database in UTC (eg. 21-10-2016, 10:00 AM) . I tried parseDateTimeUTC(formatDateTime($Entity/DateTime,'dd-MM-yyyy hh:mm a'),'dd-MM-yyyy hh:mm a'). This saves date time in the database as entered (eg. 21-10-2016, 12:00 PM) . But after that it shows dateTime in (UTC+2:00) in UI (eg. 21-10-2016, 2:00 PM)  I want to save the date what ever is entered. so If I change attributes as  a non localize. It shows me UTC datetime in UI (eg. 21-10-2016, 10:00 AM) and save in the database as UTC(eg. 21-10-2016, 10:00 AM). This is also not correct untill I manully change it to Amsterdam time (eg. 21-10-2016, 12:00 PM) . Can somebody please let me know how can I resolve this problem or somehow I can make both the datetime in the same timezone.    
asked
2 answers
2

You described the behavior you want when you changed the localized setting to no. The only remaining task there is to adjust existing times from UTC to Amsterdam time by adding 2 hours. That should be a one-time update.

answered
2

And make sure you have read this part of the documentation: https://docs.mendix.com/refguide6/DateTime+handling+FAQ

Regards,

Ronald

 

answered