import subprocess
import shlex
subprocess.call(shlex.split('timedatectl set-ntp false'))
subprocess.call(shlex.split("sudo date -s '2 OCT 2006 18:00:00'"))
subprocess.call(shlex.split('sudo hwclock -w'))
Set the hardware clock in Python?