mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-24 14:33:37 +00:00
Use UTC for published date
This commit is contained in:
parent
cbc7603248
commit
237100da18
@ -517,7 +517,7 @@ struct Video
|
|||||||
end
|
end
|
||||||
|
|
||||||
def published : Time
|
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
|
end
|
||||||
|
|
||||||
def published=(other : Time)
|
def published=(other : Time)
|
||||||
|
Loading…
Reference in New Issue
Block a user