View difference between Paste ID: 98mmCdvd and e8BJWRFu
SHOW: | | - or go back to the newest paste.
1
print("working..")
2-
m=peripheral.wrap("top")
2+
3
while true do
4
x=1
5
while x<3 do
6
term.setCursorPos(1,1)
7
timeHandle = http.get("http://worldtimeapi.org/api/timezone/Europe/Berlin")
8-
timeHandle = http.get("http://www.timeapi.org/utc/in+one+hours")
8+
time = textutils.unserializeJSON(timeHandle.readLine())
9-
time = timeHandle.readLine()
9+
10-
day=tonumber(time:sub(9, 10))
10+
sec[2]=time.unixtime
11-
month=tonumber(time:sub(6, 7))
11+
12-
hour=tonumber(time:sub(12, 13))
12+
13-
minute=tonumber(time:sub(15, 16))
13+
14
term.clear()
15-
sec[2]=tonumber(time:sub(18, 19))
15+
term.write(sec[2]-sec[1])
16
sleep(1)
17-
print(day,".",month,".2015")
17+
18-
print(hour,":",minute)
18+
19
end