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