Code to convert from seconds to hh:mm:ss

I keep a count of the number of seconds my boiler is on, which ultimately I use to estimate gas usage. I would like to display the boiler second count in a multistring in hh:mm:ss format. Is there a slick way of doing it? Can anyone give me some direction or exemplar code to get me started please?

See

https://www.lua.org/manual/5.1/manual.html#pdf-os.date

and

https://www.lua.org/pil/22.1.html

local boiler_hms =  os.date(boiler_seconds, "%X")

Not a direct answer but a similar solution I used to monitor my furnace blower (to change the filter). Attached is my PLEG logic that converts seconds to hours.