Skip to content

Commit

Permalink
fix: 临时删除 current_zone
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Dec 7, 2024
1 parent b1afe6f commit 9603070
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions source/include/Utils/Time.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ MAA_NS_BEGIN
inline std::string format_now()
{
#ifndef MAA_USE_POSIX_TIME
return std::format(
"{}",
std::chrono::current_zone()->to_local(std::chrono::floor<std::chrono::milliseconds>(std::chrono::system_clock::now())));
return std::format("{}", std::chrono::floor<std::chrono::milliseconds>(std::chrono::system_clock::now()));
#else
timeval tv = {};
gettimeofday(&tv, nullptr);
Expand All @@ -46,7 +44,7 @@ inline std::string format_now()
inline std::string format_now_for_filename()
{
#ifndef MAA_USE_POSIX_TIME
return std::format("{:%Y.%m.%d-%H.%M.%S}", std::chrono::current_zone()->to_local(std::chrono::system_clock::now()));
return std::format("{:%Y.%m.%d-%H.%M.%S}", std::chrono::system_clock::now());
#else
timeval tv = {};
gettimeofday(&tv, nullptr);
Expand Down

0 comments on commit 9603070

Please sign in to comment.