fix depricated syntax for parsing dates