Make 1.6+ work with new instance format.
This commit is contained in:
parent
92abe4c603
commit
69c3e7111f
29 changed files with 951 additions and 562 deletions
|
@ -8,16 +8,17 @@ QDateTime timeFromS3Time(QString str)
|
|||
return QDateTime::fromString(str, Qt::ISODate);
|
||||
}
|
||||
|
||||
void parse_timestamp (const QString & raw, QString & save_here, QDateTime & parse_here)
|
||||
bool parse_timestamp (const QString & raw, QString & save_here, QDateTime & parse_here)
|
||||
{
|
||||
save_here = raw;
|
||||
if (save_here.isEmpty())
|
||||
{
|
||||
throw JSONValidationError("The timestamp is empty!");
|
||||
return false;
|
||||
}
|
||||
parse_here = timeFromS3Time(save_here);
|
||||
if (!parse_here.isValid())
|
||||
{
|
||||
throw JSONValidationError("The timestamp not a valid timestamp!");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue