Every line of 'python delta time' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
102 def get_rel_delta(self): 103 return relativedelta(years=self.time_obj.tm_year * self.defined_values[0], 104 months=self.time_obj.tm_mon * self.defined_values[1] - 1, 105 days=self.time_obj.tm_mday * self.defined_values[2], 106 hours=self.time_obj.tm_hour * self.defined_values[3], 107 minutes=self.time_obj.tm_min * self.defined_values[4], 108 seconds=self.time_obj.tm_sec * self.defined_values[5]).normalized()
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code
21 def subDelta(self, sourceSeconds): 22 self.date = self.date - datetime.timedelta(seconds=sourceSeconds) 23 return self.date