I am stuck with this problem.
I already got the currentUTCtime
in seconds from the QDateTime
.
Problem is, I can't find a possible way to convert this into the local time in seconds. There are some QDate functions like toLocalTime()
which just don't seem to work. I hope somebody here can help me.
QDateTime::currentMSecsSinceEpoch();
QDateTime currentateTime = QDateTime::currentDateTime();
QDateTime UTC(QDateTime::currentDateTimeUtc());
currentDateTime.toString().toStdString();
TimeNow = currentDateTime.toMSecsSinceEpoch()/1000;
Above is my code for the currentUTC Time in seconds.