Is there some webservice or something that I can use to get the current unix timestamp? Im making a program that reads/writes files that use these and I would like it to be at least somewhat accurate.
unix timestamp
Started by columna1, Apr 07 2014 01:11 AM
3 replies to this topic
#1
Posted 07 April 2014 - 01:11 AM
#2
Posted 07 April 2014 - 04:25 AM
I use http://www.timeapi.o...now?format=%25s to get the epoch for my programs
Edited by Anavrins, 07 April 2014 - 04:25 AM.
#3
Posted 07 April 2014 - 04:39 AM
It seems that you're after something more like a unique value, and since HTML interaction is not always enabled it is better to try and do something local, as such you can do the following.
os.day — Minecraft day
os.time — Minecraft time
os.clock — time in seconds the computer has been running (this may not be the time the program has been running)
local function getMinecraftTimestamp()
return string.format("%d:%d:%d", os.day(), os.time(), os.clock())
end
os.day — Minecraft day
os.time — Minecraft time
os.clock — time in seconds the computer has been running (this may not be the time the program has been running)
#4
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












