MCPcopy Create free account
hub / github.com/NoMercy-ac/NoMercy / SystemTimeToTimestamp

Method SystemTimeToTimestamp

Source/Client/NM_Engine/Functions.cpp:46–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46DWORD CFunctions::SystemTimeToTimestamp(SYSTEMTIME st)
47{
48 std::tm tm = { 0 };
49 tm.tm_sec = st.wSecond;
50 tm.tm_min = st.wMinute;
51 tm.tm_hour = st.wHour;
52 tm.tm_mday = st.wDay;
53 tm.tm_mon = st.wMonth - 1;
54 tm.tm_year = st.wYear - 1900;
55 tm.tm_isdst = -1;
56
57 std::time_t fileCreatedTime = std::mktime(&tm);
58 return (DWORD)fileCreatedTime;
59}
60
61std::string CFunctions::GetDate()
62{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected