FIX: human readable world date

This commit is contained in:
Kolyah35
2026-03-10 23:58:20 +03:00
parent 9991ba312d
commit 3c71139a7c
2 changed files with 13 additions and 10 deletions

View File

@@ -10,10 +10,7 @@
#include <fstream>
#include <sstream>
#include <GLFW/glfw3.h>
#ifdef _WIN32
#include <windows.h>
#include <shellapi.h>
#endif
#include <ctime>
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() {