2013-09-24 79 views

回答

16

尝试os.date("!%c")。这里的!表示UTC,%c表示标准格式的完整日期。有关其他选项,请参阅http://www.lua.org/manual/5.2/manual.html#pdf-os.date

+0

感谢您的回答,下面是一些扩展使用'!'的示例代码:'''cutTime = os.time(); print(“os.date():”..os.date('%Y-%m-%d-%H:%M:%S',curTime)); print(“os.date(!):”..os.date('!%Y-%m-%d-%H:%M:%S GMT',curTime))''' –

相关问题