Datetime sanitizing fix.