问题
How can I get current utc time using Lua script and convert it to human readable text.
回答1:
Try os.date("!%c")
. Here !
means UTC and %c
means full date in standard format. For other options, see http://www.lua.org/manual/5.2/manual.html#pdf-os.date.
来源:https://stackoverflow.com/questions/18982730/how-to-get-current-utc-time-in-lua-script