Skip to content

Commit

Permalink
add set time.
Browse files Browse the repository at this point in the history
  • Loading branch information
junhuanchen committed Jan 8, 2019
1 parent 6b2f868 commit e1fec18
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions 06.clock/set_time.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import time
import machine

t = list(time.localtime(94534523))
t.insert(3, 0)
t.pop()
print(t)

rtc = machine.RTC()

print(rtc.datetime(t))
print(rtc.datetime())


print(time.time())


#
# # print(time.time())
# t1 = time.localtime(546450051)
# print(t1)
# tm.datetime(t1)
# print(tm.datetime())
# t2 = time.maketime(time.localtime(546450052))
# print(t2)
# tm.datetime(t2)
# print(tm.datetime())

# print(time.time())

0 comments on commit e1fec18

Please sign in to comment.