Use HH date library when not using MSVC

This commit is contained in:
Dan Paulat 2023-04-17 18:13:42 -05:00
parent e78dc9b3db
commit 593010acc2
10 changed files with 98 additions and 14 deletions

View file

@ -30,6 +30,10 @@
#include <QStandardPaths>
#include <QToolButton>
#if !defined(_MSC_VER)
# include <date/date.h>
#endif
namespace scwx
{
namespace qt
@ -407,8 +411,14 @@ void MainWindow::on_resourceTreeView_doubleClicked(const QModelIndex& index)
static const std::string timeFormat {"%Y-%m-%d %H:%M:%S"};
using namespace std::chrono;
#if !defined(_MSC_VER)
using namespace date;
#endif
std::istringstream in {selectedString};
in >> std::chrono::parse(timeFormat, time);
in >> parse(timeFormat, time);
if (in.fail())
{