##// END OF EJS Templates
Shows min/max x-axis data in Variable widget (2)...
Shows min/max x-axis data in Variable widget (2) Creates max() method that returns the iterator on the last value that is <= than the value passed in parameter + implements unit tests

File last commit:

r487:ff7ed2ba3c52
r600:c613c4935e08
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.;
}