Hello! To test this out, I’m setting the next event to the current time + 100 seconds.
But when it prints out, it says there’s 1 day until the event. Can someone explain this?
local currentTime = os.time() + 100
while wait(1) do
local diffSeconds = currentTime - os.time()
local countdown = os.date( '!*t', diffSeconds )
print( ( 'There are %i days, %i hours, %i minutes and %i seconds until event' ):format( countdown.yday, countdown.hour, countdown.min, countdown.sec ) )
end