Skip to content

Commit

Permalink
Dates in local time
Browse files Browse the repository at this point in the history
Moved processing of time from server side to client side, to enable displaying the date and time in the users local language, format and timezone.
  • Loading branch information
Oink70 authored Jun 8, 2023
1 parent d2d85c2 commit 827cf61
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions website/pages/stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@
{{=block[2]}}
{{ } }}
{{if (block[4] != null) { }}
<span style="padding-left: 18px;"><small>{{=readableDate(block[4])}}</small></span>
<!--<span style="padding-left: 18px;"><small>{{=readableDate(block[4])}}</small></span>-->
<span style="padding-left: 18px;"><small id="{{=block[2]}}"></small></span>
<script>document.getElementById("{{=block[2]}}").innerHTML = new Intl.DateTimeFormat(undefined, { dateStyle: 'full', timeStyle: 'long' }).format({{=block[4]}});</script>
{{ } }}
{{if (it.stats.pools[pool].pending.confirms) { }}
{{if (it.stats.pools[pool].pending.confirms[block[0]]) { }}
Expand All @@ -175,7 +177,9 @@
{{=block[2]}}
{{ } }}
{{if (block[4] != null) { }}
<span style="padding-left: 18px;"><small>{{=readableDate(block[4])}}</small></span>
<!--<span style="padding-left: 18px;"><small>{{=readableDate(block[4])}}</small></span>-->
<span style="padding-left: 18px;"><small id="{{=block[2]}}"></small></span>
<script>document.getElementById("{{=block[2]}}").innerHTML = new Intl.DateTimeFormat(undefined, { dateStyle: 'full', timeStyle: 'long' }).format({{=block[4]}});</script>
{{ } }}
<span style="float:right; padding-left: 18px; color: green;"><small>*CREDITED*</small></span>
<div><i class="fa fa-gavel"></i><small>Mined By:</small> <a href="/workers/{{=block[3].split('.')[0]}}">{{=block[3]}}</a></div>
Expand Down

0 comments on commit 827cf61

Please sign in to comment.