|
1.日志格式是####<2019-3-17 下午11时55分19秒 CST> <Info> <Health>
2.通过readlines取出2019-3-17 下午11时55分19秒
3. 想用datetime.strptime将上面的字符串转化为时间戳 a = datetime.strptime(res.group(),"%Y-%m-%d %H:%M:%S")
4.报错
File "/usr/lib64/python2.6/_strptime.py", line 325, in _strptime
(data_string, format))
ValueError: time data '2019-3-17 \xc9\xcf\xce\xe712\xca\xb115\xb7\xd619\xc3\xeb' does not match format '%Y-%m-%d %H:%M:%S'
求指导需要怎么改?
谢谢 |
|