Correctly show the "invalid date and time" error message (see #5480)