Invite QDateTime to go 8 secs on future uint
The Life on php is much better...
Why here on this code FAKENOW & MAXWAITING are Same?
only MINWAITING is correct?..
on php:
$now=date(U);
$min= date(U) - 8;
$max= date(U) + 8; // future work ok & QT not...
uint now + 8 = 0 NULL
Code:
bool check = false;
uint FAKENOW = timer1.toTime_t();
const uint MINWAITING = FAKENOW - (uint)8;
/*delete timer1;*/
timer2.addSecs((60 * 60) * 2);
const uint MAXWAITING = timer2.toTime_t();
qDebug() << "#### now ...." << FAKENOW;
qDebug() << "#### utimax ...." << MAXWAITING;
qDebug() << "#### utimin ...." << MINWAITING;
/* MAX & NOW are same ??? */
/*
QString esqlogg = QString( "SELECT WEBNUMMER FROM OGGETTO WHERE WEBNUMMER >=%1 AND WEBNUMMER =<%2 " ).arg( QString::number(mintime) , QString::number(maxtime) );
*/
Re: Invite QDateTime to go 8 secs on future uint
Quote:
Originally Posted by patrik08
The Life on php is much better...
Life is much better when one reads the docs:
Quote:
QDateTime::QDateTime ()
Constructs a null datetime (i.e. null date and null time). A null datetime is invalid, since the date is invalid.
Try:
Re: Invite QDateTime to go 8 secs on future uint
timer2.addSecs((60 * 60) * 2);
is not jump on future....!!
Code:
const uint FAKENOW = timer1.toTime_t();
const uint MINWAITING = FAKENOW - (uint)8;
/*delete timer1;*/
timer2.addSecs((60 * 60) * 2);
const uint MAXWAITING = timer2.toTime_t();
qDebug() << "#### now ...." << UmanTimeFromUnix(FAKENOW);
qDebug() << "#### utimax ...." << UmanTimeFromUnix(MAXWAITING);
qDebug() << "#### utimin ...." << UmanTimeFromUnix(MINWAITING);
/* MAX & NOW are same ??? */
/*
QString esqlogg = QString( "SELECT WEBNUMMER FROM OGGETTO WHERE WEBNUMMER >=%1 AND WEBNUMMER =<%2 " ).arg( QString::number(mintime) , QString::number(maxtime) );
*/
Re: Invite QDateTime to go 8 secs on future uint
Quote:
Originally Posted by patrik08
is not jump on future....!!
Quote:
QDateTime QDateTime::addSecs ( int nsecs ) const
Returns a QDateTime object containing a datetime nsecs seconds later than the datetime of this object (or earlier if nsecs is negative).
Try:
Code:
const uint MAXWAITING = timer2.addSecs( (60 * 60) * 2 ).toTime_t();
Re: Invite QDateTime to go 8 secs on future uint
now work ..... super .... tanks....