Fixes T8601. To reproduce the problem:
- Set your time preference to "" (the empty string). This isn't possible from the modern UI, but can be done with "Right Click > Inspect Element", or users may have carried it forward from an older setting (this is the case with me and @hach-que on this install).
- Load Calendar with some events.
- This parses an epoch, which sets valueTime to "" (since there are no format characters in the preference) and then getEpoch() fails because strlen($time) is 0.
- Since getEpoch() failed, getDateTime() also fails.
To fix this:
- Only permit the date and time preferences to have valid values.