mrWhiskasss

time

Jul 22nd, 2023
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local fs = require("filesystem")
  2.  
  3. function os.dateRL(format)
  4. if not fs.get("/").isReadOnly() then
  5. local time = io.open("/tmp/.time", "w")
  6. time:write()
  7. time:close()
  8. os.sleep(0.01)
  9. return os.date(format, fs.lastModified("/tmp/.time") / 1002.7)
  10. else
  11. return os.date(format)
  12. end
  13. end
  14.  
  15. print(os.dateRL("%x %X"))
Add Comment
Please, Sign In to add comment