mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
u8
This commit is contained in:
parent
f62dbbdcbe
commit
ff871ec4f5
@ -360,19 +360,18 @@ int main()
|
||||
}
|
||||
}
|
||||
#else
|
||||
SetConsoleOutputCP(CP_UTF8);
|
||||
auto getCurrentTimestamp = []
|
||||
{
|
||||
auto getCurrentTimestamp = []
|
||||
{
|
||||
auto now = std::chrono::system_clock::now();
|
||||
std::time_t now_time_t = std::chrono::system_clock::to_time_t(now);
|
||||
std::tm now_tm = *std::localtime(&now_time_t);
|
||||
std::ostringstream oss;
|
||||
oss << std::put_time(&now_tm, "log_%Y-%m-%d-%H-%M-%S.txt");
|
||||
return oss.str();
|
||||
};
|
||||
auto curr = getCurrentTimestamp();
|
||||
freopen(curr.c_str(), "a", stderr);
|
||||
}
|
||||
auto now = std::chrono::system_clock::now();
|
||||
std::time_t now_time_t = std::chrono::system_clock::to_time_t(now);
|
||||
std::tm now_tm = *std::localtime(&now_time_t);
|
||||
std::ostringstream oss;
|
||||
oss << std::put_time(&now_tm, "log_%Y-%m-%d-%H-%M-%S.txt");
|
||||
return oss.str();
|
||||
};
|
||||
auto curr = getCurrentTimestamp();
|
||||
freopen(curr.c_str(), "a", stderr);
|
||||
#endif
|
||||
int hr = ps.RunString(init_script);
|
||||
return hr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user