mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
Report tool improvements (#8709)
* bugreport: move to tools * bugreport: skip packaging installers, format time with seconds, remove monitor-info-report tool * bugreport: move BugReportTool to Tools folder * fix CI * fix CDPX
This commit is contained in:
@@ -9,6 +9,15 @@
|
||||
|
||||
namespace timeutil
|
||||
{
|
||||
inline std::string format_as_local(const char* format_string, const time_t time)
|
||||
{
|
||||
char timeBuf[256] = {};
|
||||
tm localtime{};
|
||||
localtime_s(&localtime, &time);
|
||||
std::strftime(timeBuf, sizeof(timeBuf), format_string, &localtime);
|
||||
return timeBuf;
|
||||
}
|
||||
|
||||
inline std::wstring to_string(const time_t time)
|
||||
{
|
||||
return std::to_wstring(static_cast<uint64_t>(time));
|
||||
|
||||
Reference in New Issue
Block a user