mirror of https://github.com/MISP/PyMISP
				
				
				
			fix: consider a timestamp < 30000000 as a date
							parent
							
								
									fbf9df4a19
								
							
						
					
					
						commit
						6297cac315
					
				|  | @ -15,7 +15,11 @@ class AbstractMISPObjectGenerator(MISPObject): | |||
| 
 | ||||
|     def _detect_epoch(self, timestamp): | ||||
|         try: | ||||
|             float(timestamp) | ||||
|             tmp = float(timestamp) | ||||
|             if tmp < 30000000: | ||||
|                 # Assuming the user doesn't want to report anything before datetime(1970, 12, 14, 6, 20) | ||||
|                 # The date is most probably in the format 20180301 | ||||
|                 return False | ||||
|             return True | ||||
|         except ValueError: | ||||
|             return False | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Raphaël Vinot
						Raphaël Vinot