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() {