Just a gut feeling without deeper research: isn't [QDateTime::setTime_t](http://doc.qt.digia.com/stable/qdatetime.html#setTime_t) the correct function to convert these?