From 3c71139a7c93d230abd6be159cc10200e7849e87 Mon Sep 17 00:00:00 2001 From: Kolyah35 Date: Tue, 10 Mar 2026 23:58:20 +0300 Subject: [PATCH] FIX: human readable world date --- src/AppPlatform_glfw.h | 14 +++++++------- src/AppPlatform_win32.h | 9 ++++++--- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/AppPlatform_glfw.h b/src/AppPlatform_glfw.h index 4133cf0..c7fd592 100755 --- a/src/AppPlatform_glfw.h +++ b/src/AppPlatform_glfw.h @@ -10,10 +10,7 @@ #include #include #include -#ifdef _WIN32 -#include -#include -#endif +#include static void png_funcReadFile(png_structp pngPtr, png_bytep data, png_size_t length) { ((std::istream*)png_get_io_ptr(pngPtr))->read((char*)data, length); @@ -106,9 +103,12 @@ public: } std::string getDateString(int s) { - std::stringstream ss; - ss << s << " s (UTC)"; - return ss.str(); + time_t tm = s; + + char mbstr[100]; + std::strftime(mbstr, sizeof(mbstr), "%F %T", std::localtime(&tm)); + + return std::string(mbstr); } virtual int checkLicense() { diff --git a/src/AppPlatform_win32.h b/src/AppPlatform_win32.h index dd19f78..c5963f8 100755 --- a/src/AppPlatform_win32.h +++ b/src/AppPlatform_win32.h @@ -103,9 +103,12 @@ public: } std::string getDateString(int s) { - std::stringstream ss; - ss << s << " s (UTC)"; - return ss.str(); + time_t tm = s; + + char mbstr[100]; + std::strftime(mbstr, sizeof(mbstr), "%F %T", std::localtime(&tm)); + + return std::string(mbstr); } virtual int checkLicense() {