I'm fixing and enhancing Sztupy's ADB-FS plugin accessing android device using ADB protocol. I'm tearing my hair off now because I can't get the time and date correctly. I have tried so many ways of converting FILETIME, unix timestamp, SYSTEMTIME, ...
I have narrowed the issue down to this:
Code: Select all
UnixTimeToFileTime(fd->modificationTime, (LPFILETIME) FieldValue);
Code: Select all
void UnixTimeToFileTime(time_t t, LPFILETIME pft) {
long long ll;
ll = Int32x32To64(t, 10000000) + 116444736000000000;
pft->dwLowDateTime = (DWORD) ll;
pft->dwHighDateTime = ll >> 32;
}
I would understand the hours (timezone) but minutes?
I'm desperate, so any information is welcome. Tested with latest TC7.57a and 8.0. VS C++ 2010 Express.
Thanks,
A.