Base: Move currentDateTimeString out of TimeInfo
currentDateTimeString does not have anything in common with TimeInfo class, move it into Tools.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <sstream>
|
||||
#include <locale>
|
||||
#include <iostream>
|
||||
#include <QDateTime>
|
||||
#include <QElapsedTimer>
|
||||
#endif
|
||||
|
||||
@@ -365,6 +366,14 @@ std::string Base::Tools::joinList(const std::vector<std::string>& vec, const std
|
||||
return str.str();
|
||||
}
|
||||
|
||||
std::string Base::Tools::currentDateTimeString()
|
||||
{
|
||||
return QDateTime::currentDateTime()
|
||||
.toTimeSpec(Qt::OffsetFromUTC)
|
||||
.toString(Qt::ISODate)
|
||||
.toStdString();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
using namespace Base;
|
||||
|
||||
Reference in New Issue
Block a user