Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- res = http.get("http://nist.time.gov/timezone.cgi?UTC/s/0/")
- Res = {}
- if res then
- while true do
- bla = res.readLine()
- if bla then
- Res[#Res+1] = bla
- else
- break
- end
- end
- res.close()
- end
- Time = string.sub(Res[49], 63, string.len(Res[49])-4)
- Date = string.sub(Res[50], 53, string.len(Res[50])-4)
- print("Now calculating how to split them!")
- DateFormat = {Time}
- Where = 1
- f = io.open("Test", "w")
- f:write(Date)
- f:close()
- for n=1,3 do
- DateFormat[#DateFormat+1] = string.sub(Date, 1, string.find(Date, ", "))
- Date = string.sub(Date, string.find(Date, ", "), string.len(Date))
- end
- print(#DateFormat)
- for n=1,#DateFormat do
- print(DateFormat[n])
- end
Advertisement
Add Comment
Please, Sign In to add comment