Volsatik

utc time

Apr 18th, 2025
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. function obj:getRealTime(raw)
  2. local handle = self.tmpfs.open("/time", "w")
  3. self.tmpfs.write(handle, "time")
  4. self.tmpfs.close(handle)
  5. return raw and self.tmpfs.lastModified("/time") / 1000 or
  6. os.date("%Y-%m-%d %H:%M:%S", self.tmpfs.lastModified("/time") / 1000) -- last arg is timestamp
  7. end
Advertisement
Add Comment
Please, Sign In to add comment