From 237100da187ed3f19acf12b42d49af1e8bf9f288 Mon Sep 17 00:00:00 2001 From: bopol Date: Sun, 21 Feb 2021 12:35:21 +0100 Subject: [PATCH] Use UTC for published date --- src/invidious/videos.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr index 74edc1560..b96f4288a 100644 --- a/src/invidious/videos.cr +++ b/src/invidious/videos.cr @@ -517,7 +517,7 @@ struct Video end def published : Time - info["microformat"]?.try &.["playerMicroformatRenderer"]?.try &.["publishDate"]?.try { |t| Time.parse(t.as_s, "%Y-%m-%d", Time::Location.local) } || Time.local + info["microformat"]?.try &.["playerMicroformatRenderer"]?.try &.["publishDate"]?.try { |t| Time.parse(t.as_s, "%Y-%m-%d", Time::Location::UTC) } || Time.utc end def published=(other : Time)