Reputation: 725
I have a code which I am writing it in QT (C++) where I want to display a date on a dateTime display on the GUI.. I get the time from another component and then I parse it into argument list and then I use Qprocess to run date - u command .. anyhow it seems like my make doesn't like what I am doing because it prints out this error:
QT UTC linux Clock skew detected. Your build may be incomplete.
the whole purpose of what I am doing is to update the UTC time of my linux computer according to the value I am getting and then gets that date using QT code to get the computer UTC time
here is part of the code :
if(month<10)
{
argument = "0"+ argument + QString::number(month);
}
else
{
argument = argument + QString::number(month);
}
if(day<10)
{
argument = "0"+ argument + QString::number(day);
}
else
{
argument = argument + QString::number(day);
}
if(hourUTC<10)
{
argument = "0" + argument + QString::number(hourUTC);
}
else
{
argument = argument + QString::number(hourUTC);
}
if(minUTC<10)
{
argument = "0"+ argument + QString::number(minUTC);
}
else
{
argument = argument + QString::number(minUTC);
}
argument = argument + QString::number(year);
argument = argument + ".";
if(secUTC<10)
{
argument = "0"+ argument + QString::number(secUTC);
}
else
{
argument = argument + QString::number(secUTC);
}
//argument = argument + QString::number((qint32)qRound(msUTC/ 1000.0));
argumentlist << argument;
qDebug() << argumentlist;
QProcess* proc = new QProcess();
// Change system date and time "date -u MMDDhhmmYYYY.ss" in tha application the date is created dynamically
proc->start(program, argumentlist);
proc->waitForFinished();
m_pOi->setTime();
any idea how can I force the change in time to my compute ? and yea I do run the code as a super user !
Upvotes: 0
Views: 3464
Reputation: 28932
I think this error happens when your file times are newer than your system clock. make
warns you that it may not be building everything correctly because of this. touch
ing all your files should sort out the problem.
One of the causes is an SCM system that preserves file times and is ahead of your system clock.
Upvotes: 2