I'm making a New Year Countdown timer but my whole script is completely off. When I try to print this code it prints out the year as 1970 and not 2019 and I have no clue why this is happening.
local new_years_date = os.time({
year = 2019;
month = 1;
day = 1;
hour = 0;
minute = 0;
sec = 0;
})
local diffTime = os.difftime(new_years_date, os.time())
local tab = os.date('!*t', diffTime)
for k, v in pairs(tab) do
print(k, v)
end
OUTPUT: (look at the year)
hour 10 min 17 wday 7 day 3 month 1 year 1970 sec 44 yday 3

1 comment
I answered this question