1
This commit is contained in:
parent
81877ced1b
commit
a8fa69dfb2
@ -22,7 +22,7 @@ std::string Logger::get_time_string()
|
||||
{
|
||||
auto now = std::chrono::system_clock::now();
|
||||
auto millis = std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()) % 1000;
|
||||
std::time_t t = std::chrono::system_clock::to_time_t(now + std::chrono::hours(8)); // UTC+8
|
||||
std::time_t t = std::chrono::system_clock::to_time_t(now); // UTC+8
|
||||
std::tm tm_now = *std::localtime(&t);
|
||||
|
||||
std::ostringstream ss;
|
||||
@ -36,7 +36,6 @@ std::string Logger::get_current_time_utc8()
|
||||
using namespace std::chrono;
|
||||
|
||||
auto now = system_clock::now();
|
||||
now += hours(8); // UTC+8
|
||||
|
||||
std::time_t t = system_clock::to_time_t(now);
|
||||
auto millis = duration_cast<milliseconds>(now.time_since_epoch()) % 1000;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user