I am trying to get a current Unix time stamp in my QT application but it outputs a wrong date.
QDateTime asd; uint unixTime = asd.toTime_t(); qDebug() << unixTime;
It outputs: 4294967295 which is 02/07/2106.
Why does it output 91 years into the future? How do I make it output the current Unix time stamp?
QDateTime asd(QDateTime::currentDateTime()); uint unixTime = asd.toTime_t(); qDebug() << unixTime;
@hskoglund This did the trick, thank you.