Fixed problem with dates and times