Commit 5d86a23e authored by Sriram Karra's avatar Sriram Karra

Relax timestamp matching regex whiel handling values from CardDAV servers

Possibly fixes: https://github.com/skarra/ASynK/issues/110
parent 1ce7c43d
......@@ -194,10 +194,10 @@ class CDPIMDB(PIMDB):
# actually in the string. This sucks, but this is all I am willing to
# do for the m moment. FIXME
res = re.search(r'(\d\d\d\d\d\d\d\dT\d\d\d\d\d\dZ).*', t)
res = re.search(r'(\d\d\d\d\d\d\d\dT\d\d\d\d\d\d).*', t)
if res:
t = res.group(1)
return datetime.datetime.strptime(t, '%Y%m%dT%H%M%SZ')
return datetime.datetime.strptime(t, '%Y%m%dT%H%M%S')
else:
t = iso8601.parse(t)
return datetime.datetime.utcfromtimestamp(t)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment