Added error messages for invalid times and dates.