An apex controller invoked by vf page in Salesforce orgs (both sandbox and prod) start to fail recently. No code update was made for years on this apex file.
The failing line is like
The exception is:
System.TypeException: Invalid date/time: 15.12.2019 13:00
However, if I run this line below in anonymous Apex in dev console, there is no exception.
I have seen win20 updates related to DateTime here, but couldn't figure out if this is the cause.
- I tested to access the vf page with the system admin user (the one ran anonymous Apex above) instead of the public portal user used behind the vf, the page does NOT throw exceptions. So the issue is definitely relating to the user!
- However, the system admin user and the public portal user are using the exactly same locale.
- The public portal user had no update since 1 year ago, not sure if
localeis really the root cause.