mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-20 06:53:30 +00:00
FIX: human readable world date
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user