Timezone calculation ony once
This commit is contained in:
parent
7140717696
commit
27ca03878c
2
main.lua
2
main.lua
@ -76,8 +76,6 @@ function normalOperation()
|
|||||||
|
|
||||||
tmr.alarm(1, 15000, 1 ,function()
|
tmr.alarm(1, 15000, 1 ,function()
|
||||||
sec, usec = rtctime.get()
|
sec, usec = rtctime.get()
|
||||||
-- Include the timezone
|
|
||||||
sec = sec + (timezoneoffset * 3600)
|
|
||||||
|
|
||||||
time = getTime(sec, timezoneoffset)
|
time = getTime(sec, timezoneoffset)
|
||||||
print("Local time : " .. time.year .. "-" .. time.month .. "-" .. time.day .. " " .. time.hour .. ":" .. time.minute .. ":" .. time.second)
|
print("Local time : " .. time.year .. "-" .. time.month .. "-" .. time.day .. " " .. time.hour .. ":" .. time.minute .. ":" .. time.second)
|
||||||
|
Loading…
Reference in New Issue
Block a user