fix: convert NaiveDateTime to DateTime for activity feed sorting
- date_trunc fragment returns NaiveDateTime without timezone - Convert to UTC DateTime before returning from preseem sync query - Fixes DateTime.compare/2 function clause error when sorting activities - All activity timestamps now consistently use DateTime with timezone
This commit is contained in:
parent
2ba5a3fd7b
commit
73daad48a5
1 changed files with 1 additions and 1 deletions
|
|
@ -322,7 +322,7 @@ defmodule Towerops.ActivityFeed do
|
|||
%{
|
||||
type: :sync,
|
||||
id: "sy-#{row.id}",
|
||||
timestamp: row.timestamp,
|
||||
timestamp: DateTime.from_naive!(row.timestamp, "Etc/UTC"),
|
||||
device_name: nil,
|
||||
site_name: nil,
|
||||
summary: "Preseem sync #{status_label}",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue