Skip to content

Commit

Permalink
Timestamp: Update workaround to support MinGW alongside MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
Doekin committed Dec 15, 2024
1 parent 5ff6813 commit ad12d2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/rfl/Timestamp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ class Timestamp {
const std::tm& tm() const { return tm_; }

private:
#ifdef _MSC_VER
// This workaround is necessary, because MSVC doesn't support strptime.
#if defined(_MSC_VER) || defined(__MINGW32__)
// This workaround is necessary, because strptime is not available on Windows.
char* strptime(const char* _s, const char* _f, std::tm* _tm) {
std::istringstream input(_s);
input.imbue(std::locale(setlocale(LC_ALL, nullptr)));
Expand Down

0 comments on commit ad12d2d

Please sign in to comment.