From 0c72fe4bbc86d99834d5ae8598b0c96d3b797c94 Mon Sep 17 00:00:00 2001
From: Claudio Ortolina
Date: Wed, 6 Nov 2024 12:39:41 +0000
Subject: [PATCH] Use time with datetime for scrobble at element
---
lib/music_library_web/live/stats_live/index.ex | 6 ++++++
lib/music_library_web/live/stats_live/index.html.heex | 7 +++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/lib/music_library_web/live/stats_live/index.ex b/lib/music_library_web/live/stats_live/index.ex
index 60d1c61c..ae287347 100644
--- a/lib/music_library_web/live/stats_live/index.ex
+++ b/lib/music_library_web/live/stats_live/index.ex
@@ -62,4 +62,10 @@ defmodule MusicLibraryWeb.StatsLive.Index do
_other -> ""
end
end
+
+ defp format_scrobbled_at_uts(uts) do
+ uts
+ |> DateTime.from_unix!()
+ |> DateTime.to_iso8601()
+ end
end
diff --git a/lib/music_library_web/live/stats_live/index.html.heex b/lib/music_library_web/live/stats_live/index.html.heex
index 06cca19e..4949e974 100644
--- a/lib/music_library_web/live/stats_live/index.html.heex
+++ b/lib/music_library_web/live/stats_live/index.html.heex
@@ -89,9 +89,12 @@
<%= track.title %>
-
+
+