function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Peter FribergPeter Friberg 

Wrong date in Salesforce UI for date time fields having a a time between 00:00 and 01:00 and using a timezone other than GMT

Anyone else experiencing a strange behaviour in the Salesforce UI when it comes to date time fields having a time between 00:00 and 01:00 and using a timezone other than GMT? I use CEST.

If I edit a datetime field in the UI and enter:
"2020-01-04 00:30".
I the check the database record, it shows wrong date:
"2020-01-02T22:30:00.000+0000"

That's just a bit more than two hours diff, right? It is two hours AND an extra 24 hours diff = 26 hours!

If I then edit the datetime field in the UI and add another hour and enter:
"2020-01-04 01:30".
I the check the database record, it shows correct date:
"2020-01-03T23:30:00.000+0000"

So if you have a DB record slowly changing 10 minutes at a time every 10 seconds forward over midnight and you keep refreshing the UI, the UI will perform a major jump back in time one full day between 00:00 and 01:00.

What do you think?

 
aria chrisaria chris
Yeah you are absolutely right.