Update some usages of timerange to new, simplified method

This commit is contained in:
Matthias
2022-11-10 18:11:39 +01:00
parent 3e676dbaa4
commit 57313dd961
6 changed files with 18 additions and 25 deletions

View File

@@ -33,11 +33,13 @@ class TimeRange:
def startdt(self) -> Optional[datetime]:
if self.startts:
return datetime.fromtimestamp(self.startts, tz=timezone.utc)
return None
@property
def stopdt(self) -> Optional[datetime]:
if self.stopts:
return datetime.fromtimestamp(self.stopts, tz=timezone.utc)
return None
def __eq__(self, other):
"""Override the default Equals behavior"""