DateTime changing bug

Enonic version: 7.4.1
OS: Ubuntu

There is a problem when I modify a content and all the DateTime properties sum -1 hour to them. Have you guys faced that problem before? What could I do to fix that, any idea?

Hello Rhuancaetano,

Now this specific date problem I have not seen before. All date times on content data get sum-1 hour to them when you modify the data? This sounds like a timezone issue. All dates are stored CET +1 on the system. So I’m guessing that you handle the dates and the +1 to hours / timezones somehow are not included in the result.

I agree. This is most likely a timezone problem, e.g. the server storing the data in UTC and the user expecting a DateTime for example in Central European Time (UTC+1)

In that case, the “fix” would be to take this into account when viewing the content.

The DateTime value saving is ok, and we can check it in Data Toolbox, if you set to some value, it will get the DateTime value that you had set and convert it to UTC+0 to save it. But after you reload the page, it will show the DateTime value that you saved with -1 hour.

I made more tests and it seems that when I have a negative UTC timezone (e.g. UTC-3), the Content Studio shows the DateTime value with a -1 hour to it, so after I “Mark as Ready” the content will save it with the wrong value.

Can you check that behavior?