From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH] time.cgi: add current date-time to this WebGUI page Date: Fri, 15 Mar 2024 10:24:58 +0000 Message-ID: <1186B529-5C39-40CC-A571-0D55AC35154D@ipfire.org> In-Reply-To: <42CFDCD2-4793-45CD-AEDF-380B02F9B02A@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2780226998456937363==" List-Id: --===============2780226998456937363== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello Jon, Yes, this is good to go. I just didn=E2=80=99t have time to test the patch, y= et. I merged it yesterday. -Michael > On 14 Mar 2024, at 15:48, jon wrote: >=20 > Michael - is this good to go?? >=20 > Jon >=20 >=20 >> On Mar 12, 2024, at 11:18 AM, jon wrote: >>=20 >> Back when I was playing with NTP and tried to make it better in 2022 I tho= ught it would have been helpful but it wasn=E2=80=99t my focus and I did not = have the skills to add it. Recently there were mentions about adding date/ti= me in the community. So it seemed like a good time to add (no pun intended). >>=20 >> Jon Murphy >> jon.murphy(a)ipfire.org >>=20 >>=20 >>=20 >>> On Mar 12, 2024, at 5:10 AM, Michael Tremer = wrote: >>>=20 >>> Hello Jon, >>>=20 >>> What is the motivation for this patch? >>>=20 >>> -Michael >>>=20 >>>> On 11 Mar 2024, at 23:45, Jon Murphy wrote: >>>>=20 >>>> - 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=3Dipfire-2.x.git;a=3Dcommit;h=3D2234e8aacac2e0= d0b06dac4513585c15c2b3b440 >>>>=20 >>>> Code-by: Leo-Andres Hofmann >>>> Signed-off-by: Jon Murphy >>>> --- >>>> html/cgi-bin/time.cgi | 4 ++++ >>>> langs/en/cgi-bin/en.pl | 2 ++ >>>> 2 files changed, 6 insertions(+) >>>>=20 >>>> 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 =3D strftime($Lang::tr{'timeformat'}, localtime); >>>> +print "
$Lang::tr{'system time'}: $now"; >>>> + >>>> &Header::closebox(); >>>> &Header::openbox('100%',1,$Lang::tr{'ntp sync'}); >>>> print <>>> diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl >>>> index 667fb5d7e..2e036adb3 100644 >>>> --- a/langs/en/cgi-bin/en.pl >>>> +++ b/langs/en/cgi-bin/en.pl >>>> @@ -2462,6 +2462,7 @@ >>>> 'system log viewer' =3D> 'System Log Viewer', >>>> 'system logs' =3D> 'System Logs', >>>> 'system status information' =3D> 'System Status Information', >>>> +'system time' =3D> 'System time (as of last page load)', >>>> 'ta key' =3D> 'TLS-Authentification-Key', >>>> 'taa zombieload2' =3D> 'TSX Async Abort/ZombieLoad v2', >>>> 'tcp more reliable' =3D> 'TCP (more reliable)', >>>> @@ -2490,6 +2491,7 @@ >>>> 'time' =3D> 'Time', >>>> 'time date manually reset' =3D> 'Time/Date manually reset.', >>>> 'time server' =3D> 'Time Server', >>>> +'timeformat' =3D> '%Y-%m-%d at %H:%M:%S %Z', >>>> 'timeout must be a number' =3D> 'Timeout must be a number.', >>>> 'title' =3D> 'Title', >>>> 'to' =3D> 'To', >>>> --=20 >>>> 2.30.2 >>>>=20 >>>=20 >>=20 >=20 --===============2780226998456937363==--