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