Archive: File Modified Date in Unixtime?


File Modified Date in Unixtime?
I just found a function to give me modified date, but how do I make that date into unixtime?


RtlTimeToSecondsSince1970 does that but is only available in 2000 and XP. Its remarks section, however, explains how to do this manually. You can use System::Int64Op to do those operations. The NSIS source code also contains to do the opposite. You can figure it out from this code.

unsigned long long ll = (st.st_mtime * 10000000LL) + 116444736000000000LL;
high = (DWORD) (ll >> 32);
low = (DWORD) ll;