I think I know now the reason why the difference is two hours. One hour cause of GMT +1 (germany), but i was confused why two and not one, but I think the reason is, that we've (in germany) another time in winter and summer (to compensate the "shorter days" in winter... or whatever).
The code I use is:
char * file_name = data->cFileName;
FILETIME file_time = data->ftCreationTime;
SYSTEMTIME system_time;
FileTimeToSystemTime(&file_time, &system_time);
char temp[1000];
sprintf(temp, "%s - %d:%d:%d (%d) %d.%d.%d", file_name, system_time.wHour, system_time.wMinute, system_time.wSecond, system_time.wMilliseconds, system_time.wDay, system_time.wMonth, system_time.wYear);
MessageBox(mirc, temp, "", MB_OK);
But what I want is code like $ctime (to use $asctime) if possible, so I tried to use this:
char * file_name = data->cFileName;
UINT64 utc = UInt32x32To64((data->ftCreationTime).dwHighDateTime, MAXDWORD);
utc += (UINT64) (data->ftCreationTime).dwLowDateTime;
UINT64 utc_secs = (UINT64)(utc / (UINT64) 10000000);
DWORD mirc_secs = (DWORD)(utc_secs - (UINT64) 11644473600);
char temp[1000];
sprintf(temp, "%u", mirc_secs);
MessageBox(mirc, temp, "", MB_OK);
The code is based on the example I gave (btw php seems to use somethink similiar to this way). I find it confusing, that the time seams to be correct on most files (no problem with the +1 or 2 hours), but on some files, the date is incorrect, for example
explorer: 22.03.2003 12:54:26 (day.month.year hour:minute:seconds)
my code: Sat Mar 22 11:54:23 2003
There is a difference of 23 hours and three seconds, and I don't know why. btw, EVERY file has the difference of 3 seconds. don't ask me why.