Timezone calculation ony once

This commit is contained in:
ollo 2016-06-19 00:34:30 +02:00
parent 7140717696
commit 27ca03878c

View File

@ -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)