SHARE
TWEET

time

a guest Aug 14th, 2017 160 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"))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top