Skip to content
Permalink
Browse files

Fix clock output

  • Loading branch information...
NEMS Linux
NEMS Linux committed Jul 11, 2019
1 parent f89c77f commit 180f33ea17a3e8d312ca19c7b7f6d5daba17c55e
Showing with 1 addition and 5 deletions.
  1. +1 −5 tv/index.php
@@ -68,11 +68,7 @@ function createTimeStamp() {
?>
// create timestamp
var ts = new Date();
// see if the user has set 24 hour or 12 hour format
var options = { <?php
if ($tv_24h == 1) echo 'hour12: false';
?> };
ts = ts.toLocaleTimeString(navigator.language, {hour: '2-digit', minute:'2-digit'}, options)<?php if ($tv_24h != 2) echo '.replace(/(:\d{2}| [AP]M)$/, "")'; ?>;
ts = ts.toLocaleTimeString(navigator.language, { hour: '2-digit', minute:'2-digit', <?php if ($tv_24h == 1) { echo 'hour12: false'; } else { echo 'hour12: true'; } ?> } )<?php if ($tv_24h != 1 && $tv_24h != 2) echo '.replace(/(:\d{2}| [AP]M)$/, "")'; ?>;
$("#timestamp_wrap").empty().append("<div class=\"timestamp_drop\"></div><div class=\"timestamp_stamp\">" + ts +"</div>");
}

0 comments on commit 180f33e

Please sign in to comment.
You can’t perform that action at this time.