Dashboard: display date and time in user selected formats

This commit is contained in:
bergware
2023-10-27 12:42:36 +02:00
parent 410ea26b0e
commit afa05760f1

View File

@@ -129,7 +129,7 @@ while (true) {
$stat[] = "Errors: {$rx_errors}<br>Drops: {$rx_drops}<br>Overruns: {$rx_fifo}\0Errors: {$tx_errors}<br>Drops: {$tx_drops}<br>Overruns: {$tx_fifo}";
}
// current date and time
$now = time();
$now = time();
$clock = _var($display,'time')=='%R' ? date('G:i',$now) : date('g:i '.esc('<span class="ampm">').'a'.esc('</span>'),$now);
$date = _var($display,'date','%c')=='%c' ? date('l, F j, Y, '.esc(_('UTC')).'P',$now) : date(mix($display['date']).', '.esc(_('UTC')).'P',$now);
$dst = date('I',$now) ? ' <sup>'._('DST').'</sup>' : '';