-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
This script can do it but needs elevated privileges:
import time
import os
try:
import ntplib
client = ntplib.NTPClient()
response = client.request('pool.ntp.org')
os.system('date ' + time.strftime('%m%d%H%M%Y.%S',time.localtime(response.tx_time)))
except:
print('Could not sync with time server.')
print('Done.')Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Todo