MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / FormatDateTime

Function FormatDateTime

DebugView++/MainFrame.cpp:320–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318}
319
320std::wstring FormatDateTime(const SYSTEMTIME& systemTime)
321{
322 int size = GetTimeFormat(LOCALE_USER_DEFAULT, 0, &systemTime, nullptr, nullptr, 0);
323 size += GetDateFormat(LOCALE_USER_DEFAULT, 0, &systemTime, nullptr, nullptr, 0);
324 std::vector<wchar_t> buf(size);
325
326 int offset = GetDateFormat(LOCALE_USER_DEFAULT, 0, &systemTime, nullptr, buf.data(), size);
327 buf[offset - 1] = ' ';
328 GetTimeFormat(LOCALE_USER_DEFAULT, 0, &systemTime, nullptr, buf.data() + offset, size);
329 return std::wstring(buf.data(), size - 1);
330}
331
332std::wstring FormatDateTime(const FILETIME& fileTime)
333{

Callers 1

GetSelectionInfoTextMethod · 0.85

Calls 3

FileTimeToSystemTimeFunction · 0.85
FileTimeToLocalFileTimeFunction · 0.85
dataMethod · 0.80

Tested by

no test coverage detected