Date and time variable being set to session time

1
Hello, I have a question about a date and time attribute.  I have a localized date and time attribute, DateOfBrith.  I am using the mendix date picker widget inside my hybrid app to set the date of birth for an object.  Sometimes, when I look at the object through the desktop, it shows the date of birth being off one day (For example when I set the date of birth to be 3/31/97 inside the hybrid app and view the object using the desktop, it shows a date of birth of 3/30/97). I did some testing and inserted some breakpoints and looking at the variable for date of birth, it showed the variable information below: UTC time: 1997-03-31 04:00:00.000 Session time: 1997-03-30 23:00:00.000 -0500 It seems at if it is setting the date of birth to be the session time.  What exactly is the session time?  Would setting this attribute as a non-localized attribute fix this issue?  If I do change it, what will be the effect of the existing date of birth values already stored?  Thank you.
asked
1 answers
3

You already got it: If you want a Date only you should use non-localized.

If you change the attribute accordingly, your exisiting values will not be changed Those are always stored in UTC. This means, that depending on the timezone from which those were stored, these will be a day off and you need to fix that somehow.

answered