If format starts with '!', then the date is formatted in Coordinated Universal Time. After this optional character, if format is the string "*t", then date returns a table with the following fields: year (four digits), month (1--12), day (1--31), hour (0--23), min (0--59), sec (0--61), wday (weekday, Sunday is 1), yday(day of the year), and isdst (daylight saving flag, a boolean).
format
!
*t
date
year
month
day
hour
min
sec
wday
yday
isdst
If format is not "*t", then date returns the date as a string, formatted according to the same rules as the C function strftime.
strftime
在 2018年10月29日,上午9:23,Louis He <louis....@gmail.com> 写道:print (os.time(os.date("!*t")))print (os.time())第一个请问是UTC的时间截吗,但我测试来看第一个好像和UTC时间不匹配。> print (os.time(os.date("!*t")))1540747342> print (os.time())1540776147[root@localhost ~]# dateMon Oct 29 09:22:51 HKT 2018 -- --