Remove "to_datetime" helper method. This can be done explicitly when necessary.

This commit is contained in:
Kuy Krawczeniuk 2021-03-26 14:27:50 -07:00
parent 0043c55c52
commit 7d6c282859

View File

@ -34,10 +34,6 @@ class TimeRange:
return (self.starttype == other.starttype and self.stoptype == other.stoptype
and self.startts == other.startts and self.stopts == other.stopts)
def to_datetime(self) -> (datetime, datetime):
return datetime.fromtimestamp(self.startts, timezone.utc), \
datetime.fromtimestamp(self.stopts, timezone.utc)
def subtract_start(self, seconds: int) -> None:
"""
Subtracts <seconds> from startts if startts is set.