The main problem with the current implementation occurs when the raspberry has lost track of time and has no access to NTP (i.e. a raspberry pi after a lightning strike: power outage + fried switch). The hardware clock would be incorrectly set at reboot and even if the RTC of the ArDAS is still correctely set and thus recorded data are stored with the correct time, date and time in logs and log names would be wrong.
->Check if this approach works?
import subprocess
import shlex
subprocess.call(shlex.split("timedatectl set-ntp false")) # May be necessary
subprocess.call(shlex.split("sudo date -s '2 OCT 2006 18:00:00'"))
subprocess.call(shlex.split("sudo hwclock -w"))
subprocess.call(shlex.split("timedatectl set-ntp true")) # May be necessary
The main problem with the current implementation occurs when the raspberry has lost track of time and has no access to NTP (i.e. a raspberry pi after a lightning strike: power outage + fried switch). The hardware clock would be incorrectly set at reboot and even if the RTC of the ArDAS is still correctely set and thus recorded data are stored with the correct time, date and time in logs and log names would be wrong.
->Check if this approach works?