forked from mirrors/kolyah35-minecraft-pe-0.6.1
FIX: human readable world date
This commit is contained in:
parent
9991ba312d
commit
3c71139a7c
2 changed files with 13 additions and 10 deletions
|
|
@ -10,10 +10,7 @@
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <GLFW/glfw3.h>
|
#include <GLFW/glfw3.h>
|
||||||
#ifdef _WIN32
|
#include <ctime>
|
||||||
#include <windows.h>
|
|
||||||
#include <shellapi.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void png_funcReadFile(png_structp pngPtr, png_bytep data, png_size_t length) {
|
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);
|
((std::istream*)png_get_io_ptr(pngPtr))->read((char*)data, length);
|
||||||
|
|
@ -106,9 +103,12 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string getDateString(int s) {
|
std::string getDateString(int s) {
|
||||||
std::stringstream ss;
|
time_t tm = s;
|
||||||
ss << s << " s (UTC)";
|
|
||||||
return ss.str();
|
char mbstr[100];
|
||||||
|
std::strftime(mbstr, sizeof(mbstr), "%F %T", std::localtime(&tm));
|
||||||
|
|
||||||
|
return std::string(mbstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int checkLicense() {
|
virtual int checkLicense() {
|
||||||
|
|
|
||||||
|
|
@ -103,9 +103,12 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string getDateString(int s) {
|
std::string getDateString(int s) {
|
||||||
std::stringstream ss;
|
time_t tm = s;
|
||||||
ss << s << " s (UTC)";
|
|
||||||
return ss.str();
|
char mbstr[100];
|
||||||
|
std::strftime(mbstr, sizeof(mbstr), "%F %T", std::localtime(&tm));
|
||||||
|
|
||||||
|
return std::string(mbstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int checkLicense() {
|
virtual int checkLicense() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue