Update getTime.lua

This commit is contained in:
erius0 2021-01-08 16:55:57 +03:00 committed by GitHub
parent b7f13d94a0
commit 61dd93b280
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,8 +10,12 @@ while true do
f:write(result) f:write(result)
f:close() f:close()
f = io.open("time.txt", "r") f = io.open("time.txt", "r")
f:seek("set", 31) f:seek("set", 30)
local time = f:read(16) local date = f:read(10)
f:seek("set", 41)
local hour = tonumber(f:read(2)) + 3
f:seek("set", 44)
local min = f:read(2)
f:close() f:close()
print(time) print(date.." "..hour..":"..min)
end end