How do format this "Time until next hour" in HH:MM:SS?

I have this time until next hour script, and it works, I just need to format it into HH:MM:SS. Here’s my script.

local nextHour = os.date("!*t", os.time() + 3600)
local nextHourSeconds = os.time({
	year = nextHour.year, month = nextHour.month, day = nextHour.day,
	hour = nextHour.hour, min = 0, sec = 0
})

while true do
	local secondsUntilNextHour = nextHourSeconds - os.time()
	print(secondsUntilNextHour)
	wait(1)
end

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.