--Get current GMT print (Os.time ())--Gets the string representation of the current time, in the form of: 11/28/08 10:28:37 print (Os.date ())--Gets the string representation of the current date, in the form: 11/28/08 print (Os.date ("%x", Os.time ())--Gets the string representation of the current time, in the form of: 10:28:37 print (Os.date ("%x", Os.time ())--Gets the string representation of the current time, in the form of: 10/10/13 10:28:37 Print (Os.date ("%c", Os.time ())--Gets the string representation of the current time, in the form of 2013-10-10 10:28:37 print (Os.date%y-%m-%d, Os.time ())--function Os.clock returns the number of clock seconds that the CPU spends executing the program local x1 = Os.clock () Local s = 0 for i = 1, 10000000 do s = s + I end local x2 = Os.clock () print (String.Format ("Elapsed time:%.2f\n", x2-x1)) Local t2009_starttime = {year=2013, month=2, day=9, H Our=0, min=0, sec=0} local t2009_endtime = {year=2013, month=2, day=17, hour=23, min=59, sec=59} t2009_avtivitytime = {starttime = Os.time (t2009_starttime), Endtime = Os.time (t2009_endtime)} print (' Success of loading package activity, Activity time: ' ... os.date ('%c ', t2009_
Avtivitytime.starttime). '~' .. Os.date ('%c ', t2009_avtivitytime.endtime)) temp = Os.date ("*t", Os.time ()) print (temp)--[[produces the table {year = 1998, month = 9,Day = Yday = 259, Wday = 4, hour = n, min =, sec = ten, Isdst = false}--]