Cherry-pick 813951402c15850642a88487f08779aeba98055c from libmygpo-qt
This commit is contained in:
parent
17dfc99462
commit
8a2e282676
|
@ -135,7 +135,14 @@ QVariantMap JsonCreator::episodeActionToQVariantMap( const EpisodeActionPtr epis
|
|||
map.insert( QLatin1String( "action" ), QLatin1String( "download" ) );
|
||||
|
||||
if( episodeAction->timestamp() != 0 ) {
|
||||
#if QT_VERSION >= 0x040700
|
||||
QDateTime dateTime = QDateTime::fromMSecsSinceEpoch(episodeAction->timestamp() );
|
||||
#else
|
||||
QDateTime dateTime = QDateTime::fromTime_t(episodeAction->timestamp() / 1000 );
|
||||
QTime time = dateTime.time();
|
||||
time.addMSecs(episodeAction->timestamp() % 1000 );
|
||||
dateTime.setTime(time);
|
||||
#endif
|
||||
map.insert( QLatin1String( "timestamp" ), dateTime.toString(Qt::ISODate) );
|
||||
}
|
||||
if( episodeAction->started() != 0 )
|
||||
|
|
Loading…
Reference in New Issue