From 0cd9fc9947215baddfb40c87ed541434e5b2dd46 Mon Sep 17 00:00:00 2001 From: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com> Date: Wed, 2 Nov 2022 15:01:54 +0100 Subject: [PATCH] Update LoopData.h --- src/LoopData.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/LoopData.h b/src/LoopData.h index 9f878dc..b4cfe8c 100644 --- a/src/LoopData.h +++ b/src/LoopData.h @@ -62,7 +62,12 @@ public: void updateDate() { time_t now = time(0); struct tm tstruct; - gmtime_s(&now, &tstruct); +#ifdef _WIN32 + /* Micro, fucking soft never follows spec. */ + gmtime_s(&tstruct, &now); +#else + gmtime_r(&now, &tstruct); +#endif strftime(date, 32, "%a, %d %b %Y %X GMT", &tstruct); }