From: Jon Murphy Date: Mon, 11 Mar 2024 23:45:00 +0000 (-0500) Subject: time.cgi: add current date-time to this WebGUI page X-Git-Tag: v2.29-core185~59 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=f561899b54d6abd81430dd26a83679d49bc3fae7 time.cgi: add current date-time to this WebGUI page - added words and date-time format to english (en.pl) - other languages are needed - seconds included since time is accurate to < .1s https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=2234e8aacac2e0d0b06dac4513585c15c2b3b440 Code-by: Leo-Andres Hofmann Signed-off-by: Jon Murphy Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/time.cgi b/html/cgi-bin/time.cgi index 57a02a4b6..04c1e771f 100644 --- a/html/cgi-bin/time.cgi +++ b/html/cgi-bin/time.cgi @@ -287,6 +287,10 @@ print < END ; + +my $now = strftime($Lang::tr{'timeformat'}, localtime); +print "
$Lang::tr{'system time'}: $now"; + &Header::closebox(); &Header::openbox('100%',1,$Lang::tr{'ntp sync'}); print < 'System Log Viewer', 'system logs' => 'System Logs', 'system status information' => 'System Status Information', +'system time' => 'System time (as of last page load)', 'ta key' => 'TLS-Authentification-Key', 'taa zombieload2' => 'TSX Async Abort/ZombieLoad v2', 'tcp more reliable' => 'TCP (more reliable)', @@ -2490,6 +2491,7 @@ 'time' => 'Time', 'time date manually reset' => 'Time/Date manually reset.', 'time server' => 'Time Server', +'timeformat' => '%Y-%m-%d at %H:%M:%S %Z', 'timeout must be a number' => 'Timeout must be a number.', 'title' => 'Title', 'to' => 'To',