mirror of
				https://github.com/bspeice/metrik
				synced 2025-11-03 18:00:51 -05:00 
			
		
		
		
	Switch default timezone when dateutil can't parse
This commit is contained in:
		@ -63,7 +63,7 @@ class LiborRateTask(MongoCreateTask):
 | 
				
			|||||||
                dt = parse(row['publication'])
 | 
					                dt = parse(row['publication'])
 | 
				
			||||||
                dt = dt.replace(year=date.year, month=date.month, day=date.day)
 | 
					                dt = dt.replace(year=date.year, month=date.month, day=date.day)
 | 
				
			||||||
                if dt.tzinfo is None:
 | 
					                if dt.tzinfo is None:
 | 
				
			||||||
                    dt = timezone('Europe/London').localize(dt)
 | 
					                    dt = timezone('America/New_York').localize(dt)
 | 
				
			||||||
                globals()['publication'] = dt
 | 
					                globals()['publication'] = dt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Because of the shenanigans I did earlier with globals(), ignore
 | 
					        # Because of the shenanigans I did earlier with globals(), ignore
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user