diff --git a/htdocs/lib/MetaPanel.js b/htdocs/lib/MetaPanel.js index 26e65f00..db5a4409 100644 --- a/htdocs/lib/MetaPanel.js +++ b/htdocs/lib/MetaPanel.js @@ -406,6 +406,11 @@ WfmMetaPanel.prototype.update = function(data) { if ('pi' in data && !this.callsign) { $el.find('.rds-identifier').text('PI: ' + data.pi); } + + if ('clock_time' in data) { + var date = new Date(Date.parse(data.clock_time)); + $el.find('.rds-clock').text(date.toLocaleString([], {dateStyle: 'short', timeStyle: 'short'})); + } }; WfmMetaPanel.prototype.isSupported = function(data) { @@ -422,6 +427,7 @@ WfmMetaPanel.prototype.setEnabled = function(enabled) { '
' + '
' + '
' + + '
' + '' ); } else { @@ -434,7 +440,7 @@ WfmMetaPanel.prototype.isEnabled = function() { }; WfmMetaPanel.prototype.clear = function() { - $(this.el).find('.rds-identifier, .rds-ps, .rds-prog_type, .rds-radiotext').text(''); + $(this.el).find('.rds-identifier, .rds-ps, .rds-prog_type, .rds-radiotext, .rds-clock').text(''); // display PI until we get the next callsign this.callsign = false; };