fixed date and timestamp handling