aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-03-18 14:55:01 +0100
committerMario <mario@mariovavti.com>2021-03-18 14:55:01 +0100
commit3ba42d3dcf252cd2c07f2f1b9c0b7d54cce759c9 (patch)
tree36358bdc3b8d408e8444743d71459c9d397c4d0b /view/tpl
parent9f26b7aa9c6e3ba50de5a0780c917cabad7367f6 (diff)
downloadvolse-hubzilla-3ba42d3dcf252cd2c07f2f1b9c0b7d54cce759c9.tar.gz
volse-hubzilla-3ba42d3dcf252cd2c07f2f1b9c0b7d54cce759c9.tar.bz2
volse-hubzilla-3ba42d3dcf252cd2c07f2f1b9c0b7d54cce759c9.zip
air: deal with timezones when displaying open/close time - this should finally fix issue #1544
Diffstat (limited to 'view/tpl')
-rw-r--r--view/tpl/plain.tpl3
-rw-r--r--view/tpl/register.tpl7
2 files changed, 8 insertions, 2 deletions
diff --git a/view/tpl/plain.tpl b/view/tpl/plain.tpl
index b01ee9baa..b0c7b3081 100644
--- a/view/tpl/plain.tpl
+++ b/view/tpl/plain.tpl
@@ -3,8 +3,7 @@
<div style="font-weight: normal; font-family: monospace;">{{$infos}}</div>
<script>
$('.register_date').each( function () {
- var UTC = $(this).html();
- var date = new Date(UTC);
+ var date = new Date($(this).data('utc'));
$(this).html(date.toLocaleString());
});
</script>
diff --git a/view/tpl/register.tpl b/view/tpl/register.tpl
index c380b5c87..8033d0a76 100644
--- a/view/tpl/register.tpl
+++ b/view/tpl/register.tpl
@@ -74,5 +74,12 @@
' .zuiqmid { font-weight: normal; font-family: monospace; }'+
' .zuirise { font-weight: bold; font-size: 100%; color: red; }'+
'</style>');
+
{{$tao}}
+
+ var week_days = ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'];
+ $('.register_date').each( function () {
+ var date = new Date($(this).data('utc'));
+ $(this).html(date.toLocaleString(undefined, {weekday: 'short', hour: 'numeric', minute: 'numeric'}));
+ });
</script>