diff --git a/cmd/server/assets/admin/events/index.html b/cmd/server/assets/admin/events/index.html index 93706b9eb..ae3667f4b 100644 --- a/cmd/server/assets/admin/events/index.html +++ b/cmd/server/assets/admin/events/index.html @@ -68,9 +68,7 @@

System event log

{{$event.Action}}
- + {{$event.CreatedAt.Format "2006-02-01 15:04"}}
diff --git a/cmd/server/assets/codes/index.html b/cmd/server/assets/codes/index.html index b7ce19689..90bcbbb81 100644 --- a/cmd/server/assets/codes/index.html +++ b/cmd/server/assets/codes/index.html @@ -49,9 +49,7 @@

Verification code status

{{$code.UUID}}
- + {{$code.CreatedAt.Format "2006-02-01 15:04"}}
diff --git a/cmd/server/assets/realmadmin/events.html b/cmd/server/assets/realmadmin/events.html index 81391dc73..09c2e689f 100644 --- a/cmd/server/assets/realmadmin/events.html +++ b/cmd/server/assets/realmadmin/events.html @@ -48,9 +48,7 @@

Realm event log

{{$event.Action}}
- + {{$event.CreatedAt.Format "2006-02-01 15:04"}}
diff --git a/cmd/server/assets/static/js/application.js b/cmd/server/assets/static/js/application.js index aefcb7d77..e8f2e9f46 100644 --- a/cmd/server/assets/static/js/application.js +++ b/cmd/server/assets/static/js/application.js @@ -105,31 +105,11 @@ $(function() { $("[data-timestamp]").each(function(i, e) { let $this = $(e); let date = new Date($this.data("timestamp")); - - let year = date.getFullYear(); - let month = date.getMonth() + 1; - if (month < 10) { - month = `0${month}`; - } - let day = date.getDate(); - if (day < 10) { - day = `0${day}`; - } - let ampm = "AM"; - let hours = date.getHours(); - if (hours > 12) { - ampm = "PM"; - hours = hours - 12; - } - if (hours < 10) { - hours = `0${hours}`; - } - let minutes = date.getMinutes(); - if (minutes < 10) { - minutes = `0${minutes}`; - } - - $this.text(`${year}-${month}-${day} ${hours}:${minutes} ${ampm}`); + $this.tooltip({ + placement: "top", + title: date.toISOString(), + }); + $this.text(date.toLocaleString()); }); // Toast shows alerts/flash messages.