fix: display deploy timestamp in user's timezone in footer
This commit is contained in:
parent
3dc22b118d
commit
139eb3b147
1 changed files with 2 additions and 1 deletions
|
|
@ -439,12 +439,13 @@ defmodule ToweropsWeb.Layouts do
|
|||
alias ToweropsWeb.TimeHelpers
|
||||
|
||||
build_time = Towerops.Application.build_timestamp()
|
||||
timezone = Map.get(assigns, :timezone, "UTC")
|
||||
|
||||
assigns =
|
||||
assigns
|
||||
|> assign(:build_time, build_time)
|
||||
|> assign(:time_ago, TimeHelpers.format_time_ago(build_time))
|
||||
|> assign(:formatted_time, TimeHelpers.format_iso8601(build_time, assigns[:timezone] || "UTC"))
|
||||
|> assign(:formatted_time, TimeHelpers.format_iso8601(build_time, timezone))
|
||||
|
||||
~H"""
|
||||
<footer class="border-t border-zinc-200 bg-white dark:border-zinc-800 dark:bg-zinc-900">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue