Browse Source

Fix formatTimeISO() on Windows.

tags/v2.0.2
Andrew Belt 3 years ago
parent
commit
affe68de7a
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/string.cpp

+ 2
- 1
src/string.cpp View File

@@ -234,7 +234,8 @@ std::string formatTime(const char* format, double timestamp) {
} }


std::string formatTimeISO(double timestamp) { std::string formatTimeISO(double timestamp) {
return formatTime("%FT%T%z", timestamp);
// Windows doesn't support %F or %T, and %z gives the full timezone name instead of offset
return formatTime("%Y-%m-%d %H:%M:%S %z", timestamp);
} }






Loading…
Cancel
Save