mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
24 hour clock support for bgclock.html
This commit is contained in:
+4
-2
@@ -61,9 +61,11 @@
|
||||
$('#arrow').attr('src', 'images/'+rec.direction+'.svg');
|
||||
var threshold = 1000 * 60 * 13;
|
||||
$('.bgnow').toggleClass('stale', (now - last > threshold));
|
||||
|
||||
|
||||
var timeDivisor = (window.serverSettings.settings.timeFormat) ? window.serverSettings.settings.timeFormat : 12;
|
||||
|
||||
var today = new Date(),
|
||||
h = today.getHours() % 12 || 12,
|
||||
h = today.getHours() % timeDivisor || timeDivisor,
|
||||
m = today.getMinutes();
|
||||
if (m < 10) m = "0" + m;
|
||||
$('.clock').text(h + ":" + m);
|
||||
|
||||
Reference in New Issue
Block a user