I'm trying to convert this value (1426519114913) that is a unix timestamp, to QDateTime object. for doing this we have fromMSecsSinceEpoch function in QDateTime that converts msecs from epoch to DateTime object. but I was unsuccessfull, for testing I do below test that it shows me that there is maybe an error with qt, am I forget something? please help me.
quint64 timestamp = QDateTime::currentMSecsSinceEpoch();
QDateTime dt3 = QDateTime::fromMSecsSinceEpoch(timestamp);
Aucun commentaire:
Enregistrer un commentaire