-- Convert Date to Unix timestamp local dateTable = {year = 2005, month = 4, day = 14, hour = 14, min = 22, sec = 51} local unixTimestamp = os.time(dateTable) print("Unix Timestamp: " .. unixTimestamp)
os.time
year
month
day
hour
min
sec
os.date()
os.date("%Y-%m-%d %H:%M:%S", 1589530245)
os.time()
os.time({year=2020, month=5, day=15, hour=8, min=30, sec=45})
os.clock()
os.difftime()
os.difftime(1589530245, 1589443845)
os.setlocale()
os.setlocale("en_US.UTF-8")
os.date("*t")
os.date("!*t")