From da091b9142fe0ef174b975a03811dea3eba7cb3e Mon Sep 17 00:00:00 2001 From: billz Date: Sun, 4 Jun 2023 15:27:54 +0000 Subject: [PATCH] Add system time to System > Basic tab --- app/lib/system.php | 6 ++++++ includes/system.php | 2 ++ locale/en_US/LC_MESSAGES/messages.mo | Bin 33981 -> 34021 bytes locale/en_US/LC_MESSAGES/messages.po | 3 +++ templates/system/basic.php | 3 +++ 5 files changed, 14 insertions(+) diff --git a/app/lib/system.php b/app/lib/system.php index 22f7255a..a0aeb51d 100644 --- a/app/lib/system.php +++ b/app/lib/system.php @@ -40,6 +40,12 @@ class Sysinfo return $uptime; } + public function systime() + { + $systime = exec("date"); + return $systime; + } + public function usedMemory() { $used = shell_exec("free -m | awk 'NR==2{ total=$2 ; used=$3 } END { print used/total*100}'"); diff --git a/includes/system.php b/includes/system.php index 774745b9..05735984 100755 --- a/includes/system.php +++ b/includes/system.php @@ -138,6 +138,7 @@ function DisplaySystem(&$extraFooterScripts) $cores = $system->processorCount(); $os = $system->operatingSystem(); $kernel = $system->kernelVersion(); + $systime = $system->systime(); // mem used $memused = $system->usedMemory(); @@ -207,6 +208,7 @@ function DisplaySystem(&$extraFooterScripts) "serverBind", "hostname", "uptime", + "systime", "cores", "os", "kernel", diff --git a/locale/en_US/LC_MESSAGES/messages.mo b/locale/en_US/LC_MESSAGES/messages.mo index 2e8e16f37499d0b5e8239a62349d1bf251eee7cc..376390db494c9463940aaa3f80639fffd30555ee 100644 GIT binary patch delta 7507 zcmYk>2Xs|M9>?){AwU8tB$x#9QeF~5D2YOlZW53ZQ0X892pvg65d;$YgBS&rei21L z5RnBNDhifGY$&W{B`h{%-348#dQd$vLOEZiK;4F;5^_YO$F$~{w^$+nb z>fd4?%x+{%EY8Ea#stku3Vs?kU=7@harh>x!^2n`Ph&h@Kn)OKn2nSm4Oy&XMEFzLT?;^ifpU%S*%6<6;z7fMEW)dUHeb2{W8|3 zy$0)~Ox8tBJPX4y9}BSu=He>Ugx zB0-ylSPyq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B9TrPv6UBR{pwZqx*)Q4wCiK)izL ze;t*v+ou7e&!Eo8 zWz;z4PxgK=YJpL%o`Bl2CV21t??gd+m4jMwKI(yD)Wow<11`lH=wS^085QYXR74-3 z#<_~h+zr$ORVQ2HP~*42RP2d$_5M$yP?LtoF$Bv|KW?8#P52TjLvLX-{0ueGUDSY; z9<>q0pfZ<+T6kwvruv}*$U!Z580t`u!%)5dMHDpgJk*NIP^sO7>bM=};Tsr_O{ds_ zvN4Hz4l1S7FdLshW$+kk;*(etzs6el6HdbbUb(8wZ)Q?Zqzh0JJcT+;+fWa_fg12V zRBAs&zB|lm*Pc1m_V128Y43wwaW$&{X$-|{s0I9v`eLieD*U=pNa1XWIp&qu!E^sD8Pqg%qIzn2QBiitX`V*bn_N zbL@}P3HTrlJ23};!QPlX*SZ=t;Cal%>zIYjc{Q@J7z=SP_Qm-5_E)ST)VRB_6mR1| zT=3Yvzli+iI0dbw#RB_UEX0Y_Z{jcdj7w&px)LAS6rR$gfLG#ZuK#u$Tb zupT~y8fOM7qf4;5-v1R8qG?!%dTa=b~MX=rZ76wq?<3-0b z^v(6U#H0om`S_XRO^8VkT0lvk`QDb8sJzM4@~Exi>O@(AJ%g29uaUS;O% zQy=ra?D&T9o@-f*I(7Oaa<$|d?k$gx^*!osi|-#Yg!|9Y)`Kh03rtA$6?=^nGJ_tc z{Yl!Ud&LQ{ffK2%_f{sPhK!>00_{t=7J3H~nnwC*=}4^}*LceMO!It+5kZC2&Qg2K zi%)#VH`Dt^VybV3cRMlG_p}$8)Glo__d9Su9B*M6W^u)FE$90GPmVVyDYpJ|w7y95 zx9-*&>Kk3p!?c~|TH#eBrTUh5=aQZZdxU$fxEj%}Z%Up$?b diff --git a/locale/en_US/LC_MESSAGES/messages.po b/locale/en_US/LC_MESSAGES/messages.po index 89eb0f97..67687e48 100644 --- a/locale/en_US/LC_MESSAGES/messages.po +++ b/locale/en_US/LC_MESSAGES/messages.po @@ -737,6 +737,9 @@ msgstr "Pi Revision" msgid "Uptime" msgstr "Uptime" +msgid "System Time" +msgstr "System Time" + msgid "Memory Used" msgstr "Memory Used" diff --git a/templates/system/basic.php b/templates/system/basic.php index 887eeea7..e231c216 100644 --- a/templates/system/basic.php +++ b/templates/system/basic.php @@ -24,6 +24,9 @@ include('includes/sysstats.php');
+
+
+