summaryrefslogtreecommitdiff
path: root/src/leap/eip/eipconnection.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-12-18 03:45:23 +0900
committerkali <kali@leap.se>2012-12-18 03:45:23 +0900
commitf104e834c96c9ec10a465bda46ef05e87ea32516 (patch)
tree3ff90be97af9b4f647bf40f5bf0daebd6b0da62b /src/leap/eip/eipconnection.py
parent89694babd14a9b2ba76095911b6884e359a12282 (diff)
Fix parsing of timestamps in a locate independent way
Close #772
Diffstat (limited to 'src/leap/eip/eipconnection.py')
-rw-r--r--src/leap/eip/eipconnection.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/leap/eip/eipconnection.py b/src/leap/eip/eipconnection.py
index 8751f643..27734f80 100644
--- a/src/leap/eip/eipconnection.py
+++ b/src/leap/eip/eipconnection.py
@@ -7,6 +7,8 @@ import Queue
import sys
import time
+from dateutil.parser import parse as dateparse
+
from leap.eip.checks import ProviderCertChecker
from leap.eip.checks import EIPConfigChecker
from leap.eip import config as eipconfig
@@ -114,8 +116,7 @@ class StatusMixIn(object):
except ValueError:
return None
- # XXX this will break with different locales I assume...
- when_ts = time.strptime(when.split(',')[1], "%a %b %d %H:%M:%S %Y")
+ when_ts = dateparse(when.split(',')[1]).timetuple()
sep = ','
# XXX clean up this!
tun_read = tun_read.split(sep)[1]