The TetherBox is designed to maintain accurate system time through multiple mechanisms, ensuring reliability even in environments with limited internet access or hardware constraints.
Time Synchronisation Process
The system continuously monitors and updates the time using the following steps:
Hardware Clock Detection
If a dedicated hardware clock is present, the system will attempt to use it as a backup for timekeeping. This is particularly useful when the device is powered off or has limited network access.
If no hardware clock is detected, the system will rely solely on internet-based time sources.
Initial Time Configuration
At startup, the system checks if the hardware clock holds a valid time.
If a hardware clock is available and its time is reasonable, the system aligns itself with this time.
If the hardware clock time is not usable or not present, the system proceeds to obtain time from the internet.
Internet Time Synchronisation
The system will attempt to fetch the current time from trusted internet time servers.
If the network is unavailable or the time servers cannot be reached, the system will retain the last known valid time.
VPN-Based Time Synchronisation (Fallback Mechanism)
If a VPN connection is available, the system attempts to synchronise time with the VPN server to ensure consistency across secure connections.
This method serves as a secondary option when public time servers are inaccessible.
Ongoing Time Adjustments
The system periodically checks whether the current time has drifted beyond an acceptable threshold.
If the time has significantly changed, the system will attempt to correct it using the most reliable available source.
If internet time is successfully retrieved, the hardware clock (if present) is updated to store the new correct time.
Handling Failures
If all methods fail, the system will continue operating with the last known valid time.
The system will reattempt synchronisation at shorter intervals until a valid time source is found.
Warnings are logged when time synchronisation fails, allowing for troubleshooting if necessary.
How This Affects the User
The TetherBox ensures accurate timestamps for logs, events, and scheduled tasks.
If the network is temporarily unavailable, the device will attempt to use its internal clock until connectivity is restored.
VPN users benefit from additional time synchronisation, reducing discrepancies when working across secure networks.
Users do not need to manually set the time; the system self-corrects as soon as a valid time source is available.
Troubleshooting
If timestamps appear incorrect, verify network connectivity to ensure the device can reach internet time servers.
If the system has been offline for an extended period, it may take a short time to re-synchronise upon reconnecting.
If persistent time inaccuracies occur, logging information can be reviewed to determine the source of the issue.