From 88e4d42c55980a4cecaaee7e9202bfeb46ec559c Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 27 Oct 2023 20:32:11 +0200 Subject: [PATCH] Dashboard: display date and time in user selected formats --- emhttp/plugins/dynamix/nchan/update_3 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/emhttp/plugins/dynamix/nchan/update_3 b/emhttp/plugins/dynamix/nchan/update_3 index 0932773b7..181456fb5 100755 --- a/emhttp/plugins/dynamix/nchan/update_3 +++ b/emhttp/plugins/dynamix/nchan/update_3 @@ -131,9 +131,8 @@ while (true) { // current date and time $now = time(); $clock = date(_var($display,'time')=='%R' ? 'G:i' : 'g:i '.esc('').'a'.esc(''),$now); - $date = date(_var($display,'date','%c')=='%c' ? 'D j M Y, T' : mix($display['date']).', '.esc(_('UTC')).'P',$now); - $dst = _var($display,'date','%c')!='%c' && date('I',$now) ? ' '._('DST').'' : ''; - publish('update3',implode("\n",$echo)."\1".implode("\0",$mode)."\1".implode("\0",$rxtx)."\1".implode("\0",$stat)."\1".$clock."\n"._($date,0).$dst); + $date = date(_var($display,'date','%c')=='%c' ? 'D j M Y, T' : mix($display['date']).', T',$now); + publish('update3',implode("\n",$echo)."\1".implode("\0",$mode)."\1".implode("\0",$rxtx)."\1".implode("\0",$stat)."\1".$clock."\n"._($date,0)); $time0 = $time; sleep(1); $time = microtime(true);