[Qt-interest] how to get current time as timestamp format
Meir Yanovich
meiry242 at gmail.com
Thu May 6 14:18:30 CEST 2010
Hi
i try to get current time as timestamp without success
here is my code that returnes me *Sunday, January 25th 1970, 03:17:35 (GMT)
QDateTime setTime = QDateTime::fromString (QString("1970-07-18T14:15:09"),
Qt::ISODate);
QDateTime current = QDateTime::currentDateTime();
uint msecs = setTime.time().msecsTo(current.time());
return QString::number(msecs);
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100506/3cc03ac6/attachment.html
More information about the Qt-interest-old
mailing list