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?



local boiler_hms =, "%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.