prevent traceback when a wrong timezone arrive.
This commit is contained in:
parent
9db1ba1d05
commit
c841c7973d
|
@ -206,7 +206,11 @@ class TimeResultReceivedEvent(nec.NetworkIncomingEvent, HelperEvent):
|
||||||
tzo = qp.getTag('tzo').getData()
|
tzo = qp.getTag('tzo').getData()
|
||||||
if tzo.lower() == 'z':
|
if tzo.lower() == 'z':
|
||||||
tzo = '0:0'
|
tzo = '0:0'
|
||||||
tzoh, tzom = tzo.split(':')
|
try:
|
||||||
|
tzoh, tzom = tzo.split(':')
|
||||||
|
except Exception, e:
|
||||||
|
# wrong tzo
|
||||||
|
return
|
||||||
utc_time = qp.getTag('utc').getData()
|
utc_time = qp.getTag('utc').getData()
|
||||||
ZERO = datetime.timedelta(0)
|
ZERO = datetime.timedelta(0)
|
||||||
class UTC(datetime.tzinfo):
|
class UTC(datetime.tzinfo):
|
||||||
|
|
Loading…
Reference in New Issue