Hi,

I have problems converting from timestamp to QDateTime. This is the code:

Qt Code:
  1. QDateTime somedate=QDateTime::fromMSecsSinceEpoch(1000*1422021168);
  2. QDate some_d=somedate.date();
  3. qWarning() << "some_d=" << some_d.toString();
To copy to clipboard, switch view to plain text mode 

and this is what I get on the console:
Qt Code:
  1. some_d= "Mon Jan 5 1970"
To copy to clipboard, switch view to plain text mode 

The date I used is of 23 Jan of this year, as you can see below

Qt Code:
  1. -bash-3.00$ cat /tmp/test.php
  2. <?
  3. $ts=1422021168;
  4. echo date("Y-m-d H:i",$ts);
  5. ?>
  6. -bash-3.00$ /usr/bin/php -f /tmp/test.php
  7. 2015-01-23 07:52
  8. -bash-3.00$
To copy to clipboard, switch view to plain text mode 

What I am missing?

TIA