Datetime Variance In Database

Hi, We have an entity with two date fields in. Lets say we capture 31 December 2010 as the date, all across the model, this date displays correctly in the date pickers. But when you display the date in a message it displays as 30 December 2010 22:00:00. It is now the same date. Why would this be? I had a look in the database and the actual date in the database is the incorrect 30 December date. This is worrying as we would report on this data and the dates would be different from the actual date captured. Please advise on what could be causing this. Kind Regards Frikkie Chalmers.
3 answers

Set the propertie localize to false on your datetime attribute, and is will be stored as UTC


How do you actually capture the date? And is the date set to localize or not? Definitely looks like some timezone issue (you are in timezone UTC+2 right? So that at least explains the minus 2 hours on that displayed date).

Either way, your data isn't corrupt as everything is stored in UTC time in the database, so it should indeed be stored as the 30th of December at 22:00. There may be a problem with how the date is shown in a message. If this is the case, please make a testproject and create a ticket for this in our support portal.


That does not make sense, to store everything in UTC time. Is this a MENDIX standard or will it be our database setup?

Certainly what the application captures in the front end is what needs to be stored in the database. Lets say that the system captures a transaction at a certain date, that is the date that must be saved and fixed in the data, not some conversion to a different locale.

We are going to use our system for capturing vouchers, incentive targets, promotions and campaigns. And all these entities rely heavily on the date being correct. Will we be able to just change the project's default language setting and the datetime will be correct?

Is there a document that I can download that explains this scenario?