This commit is contained in:
2025-04-15 18:38:03 +08:00
commit 23537c3ae9
12 changed files with 799 additions and 0 deletions

13
tools.cpp Normal file
View File

@@ -0,0 +1,13 @@
#include "tools.h"
std::string get_utc8_time() {
auto now = std::chrono::system_clock::now();
std::time_t now_time = std::chrono::system_clock::to_time_t(now);
now_time += 8 * 3600;
std::tm *tm = std::gmtime(&now_time);
std::stringstream ss;
ss << std::put_time(tm, "%Y-%m-%d %H:%M:%S");
return ss.str();
}