Hi,
I have a unix time 1194278852, which is 11/05/2007 4:07pm GMT.
How do I use Qt to convert it?
Thanks
Hi,
I have a unix time 1194278852, which is 11/05/2007 4:07pm GMT.
How do I use Qt to convert it?
Thanks
Take a look at QDateTime (especially notice a static member it has).
J-P Nurmi
Hmm... sounds fine to me:
Qt Code:
#include <QtCore> #include <QtDebug> int main(){ uint x = 1194278852; return 0; }To copy to clipboard, switch view to plain text mode
The answer is in localtime which is GMT+1.$ ./x
QDateTime("pon. lis 5 17:07:32 2007")
pdoria (23rd January 2008)
Bookmarks