MCPcopy Create free account
hub / github.com/DiscordMessenger/dm / FileTimeToTimeT

Function FileTimeToTimeT

src/windows/WinUtils.cpp:1631–1643  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1629}
1630
1631static time_t FileTimeToTimeT(LPFILETIME ft)
1632{
1633 ULARGE_INTEGER uli {};
1634 uli.LowPart = ft->dwLowDateTime;
1635 uli.HighPart = ft->dwHighDateTime;
1636 auto lt = (uli.QuadPart - 116444736000000000LL) / 10000000LL;
1637
1638 assert(lt < 2000000000);
1639 if (lt > 2147483647)
1640 lt = 2147483647;
1641
1642 return (time_t) lt;
1643}
1644
1645time_t MakeGMTime(const tm* ptime)
1646{

Callers 1

MakeGMTimeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected