Fix a bug of date convert.