Posted 08 April 2018 - 02:12 PM
Hi. I know it's late, but I needed to do this myself just now and the link Lyqyd gave doesn't work for me.
I just used Google and it seems to work fine, though it's sketchy, I thought I'd share my code for the people who want to have the real time as well and stumble upon this thread using Google or something =P
[Split from here. -L]
I just used Google and it seems to work fine, though it's sketchy, I thought I'd share my code for the people who want to have the real time as well and stumble upon this thread using Google or something =P
function getRealTime()
local page = http.get("http://www.google.nl/search?&q=time")
local raw = page:readAll()
local raw2 = ""
for a in raw:gmatch(">%d?%d:%d%d</div>") do raw2 = a end
local time = ""
for a in raw2:gmatch("%d?%d:%d%d") do time = a end
return time
end
[Split from here. -L]
Edited on 11 April 2018 - 10:52 PM