You need to sign in to do that
Don't have an account?
Peter 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?
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 chris
Yeah you are absolutely right.