bear / parsedatetime

Parse human-readable date/time strings
Apache License 2.0
695 stars 106 forks source link

wrong parsing 'Sun 4 Mar 07:20:44 CET 2018' #226

Open fenchu opened 6 years ago

fenchu commented 6 years ago

This is systemtime on my rasberry pie running rasbian:

#!/usr/bin/env python3
import parsedatetime
import pytz
cal = parsedatetime.Calendar()
d='Sun  4 Mar 07:20:44 CET 2018'
ts, _ = cal.parseDT(datetimeString=d, tzinfo=pytz.timezone("CET"))
print(ts)
./timestamp2.py
2018-03-04 20:18:00+01:00
$ pip freeze | egrep '(parsedatetime|pytz)'
parsedatetime==2.4
pytz==2017.3
$ python3 --version
Python 3.6.4