Clocks in general purpose computers are garbage, relative to the accuracy expected in modern devices. Not precisely calibrated, and a server's thermal changes can cause the drift to vary. So it needs some method to be updated, or eventually it will become inaccurate, by minutes in extreme cases. Sometimes just having the clocks agree is enough, but people tend to expect better.
Onward to practical configurations. On Linux for example, chrony is popular, and has features for manually setting the clock and dealing with getting disconnected. Start with examples such as RHEL documentation on time keeping, and refer to the chrony manual as reference.
Most time servers have at least one of internet access, a sat nav antenna, or accurate clock hardware. By default chrony will serve time if it ultimately comes from a reference clock via NTP. Set allow directive to your net and use your NTP server. If however, you have none of these, you can make chrony serve time anyway with the local directive.
If this is truly an airgapped network with no time hardware either, also enable the manual directive, so you can tell it the time manually with chronyc settime
.
chrony.conf with these on, some commentary on what you can use for a NTP server, and some things I like from the EL default config:
# chrony.conf that still serves time if not syncronized
# Options for time sources
# NTP appliance
# For example, sat nav modules are inexpensive
# Assuming it is available over IP, it is an NTP server
#server time.zone.example.net iburst
# Isolated computers need software updates too!
# If there is an update server on the local net via IP,
# it can serve NTP as well as patches
#server updateproxy.example.net iburst
# Public internet NTP
# Use if you actually have internet
# But no local time source somehow
#pool 2.pool.ntp.org iburst
# Pretend local clock is syncronized
# Enabling serving time
# Use a high stratum, as a lower priority over better clocks
local stratum 10
# Allow "chronyc settime"
# Run this with input time based on e.g. a watch or other clock
# Regularly and when the time is wrong
manual
# Allow clients to query this server
# Replace with your local net prefix
allow 2001:db8:2ea1::/48
### End source customization
### Begin other configuration
# Allow the system clock to be stepped in the first three updates
# if its offset is larger than 1 second.
makestep 1.0 3
# Enable kernel synchronization of the real-time clock (RTC).
rtcsync
# Get TAI-UTC offset and leap seconds from the system tz database.
leapsectz right/UTC
# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift
logdir /var/log/chrony
log measurements statistics tracking