##// END OF EJS Templates
Updates AMDA result parser to accept NaN values...
Updates AMDA result parser to accept NaN values If a value is invalid (for instance not a double), it is converted to NaN. A result line is still invalid if x is invalid (not a date)

File last commit:

r487:ff7ed2ba3c52
r496:10850ea661a6
Show More
DateUtils.cpp
13 lines | 383 B | text/x-c | CppLexer
#include "Common/DateUtils.h"
QDateTime DateUtils::dateTime(double secs, Qt::TimeSpec timeSpec) noexcept
{
// Uses msecs to be Qt 4 compatible
return QDateTime::fromMSecsSinceEpoch(secs * 1000., timeSpec);
}
double DateUtils::secondsSinceEpoch(const QDateTime &dateTime) noexcept
{
// Uses msecs to be Qt 4 compatible
return dateTime.toMSecsSinceEpoch() / 1000.;
}