diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/simpleble/use-std-localtime.patch | |
Diffstat (limited to 'vcpkg/ports/simpleble/use-std-localtime.patch')
| -rw-r--r-- | vcpkg/ports/simpleble/use-std-localtime.patch | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vcpkg/ports/simpleble/use-std-localtime.patch b/vcpkg/ports/simpleble/use-std-localtime.patch new file mode 100644 index 0000000..a4e7578 --- /dev/null +++ b/vcpkg/ports/simpleble/use-std-localtime.patch @@ -0,0 +1,16 @@ +diff --git a/simpleble/src/Logging.cpp b/simpleble/src/Logging.cpp +index 781b658..6b05e44 100644 +--- a/simpleble/src/Logging.cpp ++++ b/simpleble/src/Logging.cpp +@@ -90,7 +90,11 @@ void Logger::log_default_stdout() { + + void Logger::log_default_file() { + std::time_t t = std::time(nullptr); ++#if FMT_VERSION < 120000 + std::string date_time_str = fmt::format("{:%Y-%m-%d_%H-%M-%S}", fmt::localtime(t)); ++#else ++ std::string date_time_str = fmt::format("{:%Y-%m-%d_%H-%M-%S}", *std::localtime(&t)); ++#endif + std::string filename = fmt::format("simpleble_{}", date_time_str); + log_default_file(filename); + } |