Fixed a PHP notice about undefined dateTime.