##// END OF EJS Templates
Fix bug when creating two variables crash the app. ...
Fix bug when creating two variables crash the app. Variable as now invalid range and cache range at creation

File last commit:

r449:ff7ed2ba3c52
r699:a7f60f6512e6
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.;
}