LuaScripts/getTime.lua

13 lines
279 B
Lua
Raw Normal View History

2021-01-08 13:32:55 +00:00
local internet = require("internet")
while true do
local handle = internet.request("http://worldclockapi.com/api/json/utc/now")
local result = ""
for chunk in handle do
result = result..chunk
end
local f = io.open("time.txt", "w")
f:write(resul)
f:close()
end