Hello folks,
I want to modify a file's LastWriteTime (the one that shows up in an Explorer view).
The time part of the file stamp should be "2:10" (version number).
Unfort. I get "4:10" as a result. Obviously time zone differences and daylight saving time are
automatically added here by Windows. I absolutely don't want this to happen. How do I avoid it?
Here's the crucial part of my code:
------------------
mailto:[email protected][email protected]</A>
www.basicguru.com/zijlema/
I want to modify a file's LastWriteTime (the one that shows up in an Explorer view).
The time part of the file stamp should be "2:10" (version number).
Unfort. I get "4:10" as a result. Obviously time zone differences and daylight saving time are
automatically added here by Windows. I absolutely don't want this to happen. How do I avoid it?
Here's the crucial part of my code:
Code:
#COMPILE EXE #INCLUDE "WIN32API.INC" FUNCTION PBMain() AS LONG LOCAL st AS SYSTEMTIME, lwt AS FILETIME, ofs AS OFSTRUCT LOCAL hFile AS LONG LOCAL szFileName AS ASCIIZ * %MAX_PATH szFileName = "TEST.BAS" ' file in current dir st.wYear = 2001 st.wMonth = 10 st.wDay = 19 st.wHour = 2 st.wMinute = 10 st.wSecond = 0 CALL SystemTimeToFileTime(st, lwt) ' convert SYSTEMTIME to FILETIME hFile = OpenFile(szFileName, ofs, %OF_READWRITE) ' create file handle CALL SetFileTime(hFile, BYVAL 0, BYVAL 0, lwt) CALL CloseHandle(hFile) END FUNCTION
------------------
mailto:[email protected][email protected]</A>
www.basicguru.com/zijlema/
Comment