Qt C++ Convert seconds to formatted string (hh:mm:ss)
Your timezone is included in it thats why. Try this:
QDateTime::fromTime_t(10).toUTC().toString("hh:mm:ss");
There is no QTime::fromTime_t
; possibly you're using QDateTime::fromTime_t
, which accounts for time zones and daylight savings.
Instead you can use QTime().addSecs(10).toString(...)
.