fix the datetime parsing issue