lua中获取时间

os.date()    返回  XX/XX/XX XX:XX:XX

                         月/日/年    时:分:秒

 

os.time()   返回的是从1970年1月1日到现在的经过的秒数。

 

例如:

print(os.date())
print(os.time())

 

 

结果:

01/19/16 09:09:46

1453165786

 

posted @ 2016-01-19 09:14  hbg-rohens  阅读(604)  评论(0编辑  收藏  举报