Maybe simpler to do QDateTime::fromTime_t(dt.toUTC().toTime_t());