mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 08:20:05 +00:00
Use HH date library when not using MSVC
This commit is contained in:
parent
e78dc9b3db
commit
593010acc2
10 changed files with 98 additions and 14 deletions
|
|
@ -5,6 +5,10 @@
|
|||
#include <fmt/chrono.h>
|
||||
#include <fmt/format.h>
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
# include <date/date.h>
|
||||
#endif
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace provider
|
||||
|
|
@ -73,6 +77,10 @@ AwsLevel2DataProvider::GetTimePointFromKey(const std::string& key)
|
|||
{
|
||||
using namespace std::chrono;
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
using namespace date;
|
||||
#endif
|
||||
|
||||
static const std::string timeFormat {"%Y%m%d_%H%M%S"};
|
||||
|
||||
std::string timeStr {key.substr(offset, formatSize)};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue