TiME: What time is ipfire?

if one reads the infos it is clear:
correct date&time is essential on every device in times of TLS1.3 always on :grimacing:

i was not able to find a page on the wui showing the ipfire’s system date&time :face_in_clouds:
where is it shown on the wui? :mag_right:
or should one ask technically more correct:
why is it not shown on the wui? :mag: :man_shrugging:

also lets have some fun and list routers/firewalls
incapable of/lacking this feature like ipfire:

  • fritzbox :piñata:

At Services → Time Server you can set the relevant informations for NTP

The timezone is setup during inital setup, shown here:

2 Likes

@wiesel
morning!
your answer is not related to my question :upside_down_face:

My guess to the why question? Trade-off decisions taken by the developers prioritizing the workload and their time and resources.

The best course of action for a user is I believe to provide a patch to introduce this functionality. The second best, open good bug report to request the feature. For good, I mean detailed. Where this data should be shown and why, at the very minimum.

3 Likes

→ If the console with date and/or hwclock is not enough, a potential idea might be →

--- /srv/web/ipfire/cgi-bin/time.cgi.orig	2023-03-06 09:28:13.519013557 +0100
+++ /srv/web/ipfire/cgi-bin/time.cgi	2023-03-06 10:44:37.691907174 +0100
@@ -32,6 +32,7 @@
 
 my %timesettings=();
 my $errormessage = '';
+my $timestamp = strftime "%H:%M:%S on %a %e %b %Y", localtime;
 
 &Header::showhttpheaders();
 
@@ -285,6 +286,11 @@
 	<td class='base' colspan='4'><input type='checkbox' name='ENABLESETONBOOT' $checked{'ENABLESETONBOOT'}{'on'} /> $Lang::tr{'Set time on boot'}</td>
 </tr>
 </table>
+
+<br>
+	Current localtime is: $timestamp
+</br>
+
 END
 ;
 &Header::closebox();

maybe ? For sure this can be made much much better :innocent:

Best,

Erik

5 Likes

I do not see the necessity for this feature.
Each additional information in the page definition produces possible errors. Because of the effort to find and correct them, this should be done for essential things only.

To see IPFire’s time just use IPFire’s NTP server in your client.
Most (all?) desktops of current OSs show time and date. If it is retrieved from IPFire, it also IPFires time and date.

3 Likes

This is how I do it in the console.

  1. have a non-root user
  2. I have in .bashrc the following code:
 alias now='date +"%Y-%m-%d %T"'
  1. after source .bashrc to load the configuration file
  2. now tells me the time in the following format:
[cfusco@ipfire ~]$ now
2023-03-06 11:24:43
1 Like

@ummeegge
i will try to hack that :pick::man_farmer:

@cfusco
believe it or not i am very surprised that i have to create this topic here :face_with_peeking_eye:
besides the toys from avm ive not been confronted with an appliance
not able to show the appliances time on the appliances wui so far :person_shrugging:
btw: console≠wui :wink:

and to read something like:

I do not see the necessity for this feature.
Each additional information in the page definition produces possible errors. Because of the effort to find and correct them, this should be done for essential things only.

is fantastic :monkey:

@world
anyone here disagrees that system’s time is crucial :carousel_horse:

What is ‘crucial’ to know ‘the system’s time’?
It is essentially that the system ( IPFire ) has the right time. This should be ensured by the time processes. If something is wrong, you have to go to the console anyway. And there you can get the information.

6 Likes

@bbitsch
i do not see the necessity for your post. :no_mouth:

Currently not sure if it makes sense but if you place a script in e.g. /usr/bin named e.g. timecheck you can execute it via ssh to see some specifics… as an example

#!/bin/bash

#
# Check system time, ntp server time and hardware clock.
# Check as addition for ntpdate functionality
#
########################################################
#


# Check NTP time via ntpdate, date and hwclock
echo -e "\nNTP Time: " && \
ntpdate -q pool.ntp.org | tail -1 | awk '{print $1, $2, $3}' && \
echo -e "\nSystem Time: " && \
date '+%d %b %T' && \
echo -e "\nHardware Clock:" && \
hwclock --show && \
echo -e "\nIs ntpdate active ?" && \
ntpdate -q pool.ntp.org

# EOF

The ssh command executed on your client machine (if linux) can be →

ssh -p 222 root@{GREEN_IP_IPFIRE} '/usr/bin/timecheck'

the different commands also needs time :smile: but better to check ntpdate before date so the seconds should be equal…

But again not sure if it makes sense in your opinion.

Best,

Erik

P.S.: Hacking the CGI won´t survive specific updates in this CGI!

4 Likes

In my IT adminstration carrer i have used and configured many firewalls like Check Point, Palo, pfSense, OPNsense, mikrotik, ipfire, m0n0wall, and so on. But nowhere, i ever had to see the time in a GUI. Exception is to see it on the console, when debugging. Because: The thing you do, as bbitsch said, you configure NTP, and rely on it working correctly. And, except for someone messing up firewall rules for port 123, i have never seen NTP failing. And if you have fear, it will somewhen fail - There is monitoring like Icinga, Prometheus, check_mk, and many others.

So speaking for my @world: I aggree, system time is crucial - but not visibly seeing it :slight_smile:

7 Likes

@ummeegge
thx for the console snipped but this topic is all about wui here. :wink:
and thx for the reminder regarding the update-dilemma :octopus:

@wiesel
morning, lucky you! :mantelpiece_clock:
maybe you can help :smiley:
if you still have access to those gui/wui and can examine if
there is a gui-/wui-place showing the systems time
despite the fact you possibly ignored it your whole life :question::person_shrugging:

You are welcome, and i think we get more close to a potential solution which you are seeing or what you try to achieve ?!

Best,

Erik

I remember a similar discussion about this topic - approx. eights years ago, resulting in something like this:

The code exists, but was never integrated…

4 Likes

:partying_face:
exactly what i am looking for :jack_o_lantern:

@mfischer
you made my day :+1:
any memories why it was dropped?
or links to the discussion? :male_detective:

No problem:

Once upon (2015) an old forum, there was a discussion and perhaps a patch… :wink:

=> Fwd: Re: [PATCH] actual system time and timezone info-bar to ipfire theme

If you can’t find the source code => PM.

3 Likes

@mfischer
thx for the link, nice read. so i am not the only :clown_face: who needs to see
the systems time at the wui :smirk_cat:
even the leader agreed the time-thing :bowing_man:
however patch means i have to apply the patch and build ipfire myself :question:
if so this is beyond my resources. as soon as i have the time i will try the time.cgi hack :pick:

btw there are still no new examples :ferris_wheel:

FYI:

In fact, the original version(s) of this “addon” was/were never finalized. At some point the discussion just kind of faded away…

The only sources I still have (running here under Core 173) , consist of eight files. Some existing files need to be patched, others are added.

But if “someone” has no experience integrating these files in a running system, this could at least harm the existing installation.

2 Likes

The patch submitter said he was working on an updated version which would be supplied in a months time. After that there was no further mail message from them in at least the following 6 months that I checked. So the patch submitter never came back again.