Fix invalid format date error with non-english locale.