To enable ntp in rasberry pi use the following command:
pi@raspberrypi:~ $ sudo timedatectl set-ntp true
To disable ntp in rasberry pi use the following command:
pi@raspberrypi:~ $ sudo timedatectl set-ntp false
pi@raspberrypi:~ $ sudo timedatectl Local time: Sat 2021-03-13 16:08:04 IST Universal time: Sat 2021-03-13 10:38:04 UTC RTC time: Fri 2021-03-12 09:42:07 Time zone: Asia/Kolkata (IST, +0530) System clock synchronized: no NTP service: inactive RTC in local TZ: no pi@raspberrypi:~ $
Or u You can use the following command to see the status:
self.changeDate = "2021-03-13"
self.changeTime = "16:15:59"
def setClockOk(self): print("++++ Changing Time and Date+"+str(self.changeDate)+" ++++++ "+str(self.changeTime)+"+++++") subprocess.call( "sudo hwclock --set --date '" + str(self.changeDate) + " " + str(self.changeTime) + "'", shell=True) subprocess.call( "sudo hwclock --hctosys", shell=True)
Comments50
cialis gel caps
uqvnlexm
nbhqauyu
cialis causes hemmeroids
iditjagp
ltfypaye
obwbupxa
ujbruckw
zongcavo
vsmkxuda
dvludrvk
dypojjrg
gtbaxytz
xtxozpcx
wvpzorjb
jtwqtumj
gvlvfiaf
ypfgaxfs
Icogma
qbvjxnip
vbmyvczm
xotqwfsv
tkjadqmo
asjqayia
gbirghmh
mbztwpwi
oncvpfac
sxzsrlnh
fgthikqb
zlffobns
fgxxmlebq
umoqqgxh
vymiyshb
ursclrkg
ltafssrb
jmvvvbhm
isekcevu
qdhtcetb
csgrrboc
ylfluhxi
ibipskbl
xfbgfqtj
saedcddu
icmwzneh
cwifkpqf
vbaxnhdd
qzkoiqnb
lguarfqi
ejdxujca
lfkdubph