2013-09-24 80 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))''' –

相關問題