When you are handling date time, Mendix will save the date in UTC format.
When rendering on browser, it will convert it to the the date time appropriate for the timezone the browser is set.
I think that is the reason, you are seeing this difference.
Or, one another reason could be, the user’s timezone in the application is set to different one than the one in browser.
For example, if you user’s time zone is set to European time, while that in browser in Indian time, then you will see 1 day difference, which is also something I faced.
Read the documents:
When you save the date, it is always saved in UTC format only.
When you set it as localized, which you already did, it will show the date in the user timezone format that is as per the browser settings.
When it is non-localized, then the date will not be converted.
So you cannot influence the way datetime is stored, unless, if you want to store the date time as String, which I would not advise.
Check the timezone set for the user and also the browser.