I've been racking my brain for the past few days trying my best to figure out a way of getting the real life time in OC.
function os.dateRL(format)
if not fs.get("/").isReadonly() then
local time = io.open("/tmp/.time", "w")
time:write()
time:close()
os.sleep(0.01)
return os.date(format, fs.lastModified("/tmp/.time") / 1002.7)
else
return os.date(format)
end
end
That is the closest I've gotten thus far. The issue with this bit of code is that it thinks it's 3 days behind what it really is, and would require constant update to stay on target-ish...
There is no deadline on this, it's mostly a vanity project for the OS I've been working on, but it would still greatly increase the accuracy of the user logs of my login system, as right now I'm just using 'os.date("%F %X")'.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Description:
I've been racking my brain for the past few days trying my best to figure out a way of getting the real life time in OC.
That is the closest I've gotten thus far. The issue with this bit of code is that it thinks it's 3 days behind what it really is, and would require constant update to stay on target-ish...
There is no deadline on this, it's mostly a vanity project for the OS I've been working on, but it would still greatly increase the accuracy of the user logs of my login system, as right now I'm just using 'os.date("%F %X")'.
Link to post
Share on other sites