Fore the following code snippet
Qt Code:
quint64 t = 1464808943000; QDateTime dt; dt.fromMSecsSinceEpoch(t); if (dt.isValid()) cout << "Valid" << endl; else cout << "Not valid" << endl; cout << timeStamp.toStdString() << endl;To copy to clipboard, switch view to plain text mode
The output is
Not Valid,
(empty string)
I am convinced that the number is valid. Entering it in http://www.epochconverter.com/ generates a valid date-time Wed, 01 Jun 2016 19:22:23 GMT.
Using Qt 4.8 on Wincows 8, compiling with Visual Studio 2010.
What am I doing wrong?
Michael
Bookmarks