Make timeliner able to sort aware datetimes. Otherwise, it will raise an exception when comparing the plugin output data with this naive datetime

This commit is contained in:
Gustavo Moreira
2024-07-30 17:18:14 +10:00
parent b343734bae
commit efc48d5831
+3 -1
View File
@@ -105,7 +105,9 @@ class Timeliner(interfaces.plugins.PluginInterface):
data = item[1]
def sortable(timestamp):
max_date = datetime.datetime(day=1, month=12, year=datetime.MAXYEAR)
max_date = datetime.datetime(
day=1, month=12, year=datetime.MAXYEAR, tzinfo=datetime.timezone.utc
)
if isinstance(timestamp, interfaces.renderers.BaseAbsentValue):
return max_date
return timestamp