mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-14 08:17:13 +03:00
Check time-of-day in locale-independent way
This commit is contained in:
parent
e86d915b04
commit
374db8ae23
2
eddn.py
2
eddn.py
@ -84,7 +84,7 @@ class EDDN:
|
||||
# Assumes that the gateway returns a strictly compliant Date - https://tools.ietf.org/html/rfc7231#section-7.1.1.1
|
||||
try:
|
||||
r = self.session.get(self.HEALTH, timeout=timeout)
|
||||
return timegm(time.strptime(r.headers['Date'], "%a, %d %b %Y %H:%M:%S GMT"))
|
||||
return timegm(time.strptime(r.headers['Date'].split(',')[1].strip(), "%d %b %Y %H:%M:%S GMT"))
|
||||
except:
|
||||
# On any error assume that we're good
|
||||
if __debug__: print_exc()
|
||||
|
Loading…
x
Reference in New Issue
Block a user