Create getTime.lua

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

12
getTime.lua Normal file
View file

@ -0,0 +1,12 @@
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