Future Data selection Issue from Data Picker

0
Hi Team,   In my project I am using date picker object from the UI to let the user select a future and I am displaying it to the user in format ‘dd MMM yyyy’. But the date value stored in table is passed is one day lesser than the selected for example.   If the selected date from the date picker is ‘17 Mar 2022’, the value stored in table is ‘16 Mar 2022 18:30:00’. I tried to update the default time zone from Project setting to CT as GMT-06:00 but still see no change. Beside that I tried varius format date time optuions also tried the options mentioned in the below forum suggestions but none worked. https://community.mendix.com/link/ideas/647 https://community.mendix.com/link/questions/96621 Any idea how to fix this issue without any harcoding or this is a know issue with ?
asked
2 answers
1

Dilip,

All date values in Mendix are stored in Coordinated Universal Time.  I am guessing you are in India (or a similar time zone to India) because when you pick March 17 2022, Mendix sees that as the beginning of the day March 17, 2022 in your time zone.  India Standard Time is 5 hours 30 minutes ahead of UTC, so the internally stored time for the selected date is 5 ½ hours before the start of the day March 17, which is 16:30 March 16.

If this date is localized in the domain model, you will see it in your local time zone.  For instance, if I view this date and my local time zone is US Eastern Time, I would see it as 11:30 March 16 (5 hours earlier than UTC).

If the time portion of this date is not important, you should set the attribute to not localized.

Hope that helps,

Mike

answered
0

Have you checked the timezone setting of the user you're logged in as? Changing the default timezone wouldn't change existing users’ timezones I think!

 

answered