commit 1
This commit is contained in:
9
test-time.py
Normal file
9
test-time.py
Normal file
@@ -0,0 +1,9 @@
|
||||
import time
|
||||
import ntptime
|
||||
tz_offset = 0
|
||||
utc = time.localtime()
|
||||
local = time.localtime(time.mktime(utc) + tz_offset * 3600)
|
||||
ctime = f"{local[0]:02}-{local[1]:02}-{local[2]:02} {local[3]:02}:{local[4]:02}:{local[5]:02}"
|
||||
#print("Time =", local[0] + '-' + local[1] + '-' + local[2])
|
||||
#print("Time =", local)
|
||||
print("Time =", ctime)
|
||||
Reference in New Issue
Block a user