##// END OF EJS Templates
Added more features in DateTimeRange to prepare variable synchronization...
Added more features in DateTimeRange to prepare variable synchronization DateTimeRange and helpers has to ease any operation on time ranges to allow more complex operations between variables. Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>

File last commit:

r0:86b06c4cec3c
r8:69bf3d2aeca6
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.;
}