hi all

we've been tracking down a discrepancy between the atime reported by
finfo->atime and stat [1].  as it turns out, the documented behavior for
GetFileInformationByHandle's ftLastAccessTime [2] is very different from
that of a raw stat call.

anyway, just in case it helps others debug things in the future, here's a
brief note.

--Geoff

[1] http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=107158889515733&w=2
[2]
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/by_handle_file_information_str.asp
Index: file_io/win32/filestat.c
===================================================================
RCS file: /home/cvspublic/apr/file_io/win32/filestat.c,v
retrieving revision 1.83
diff -u -r1.83 filestat.c
--- file_io/win32/filestat.c    19 Nov 2003 00:25:17 -0000      1.83
+++ file_io/win32/filestat.c    16 Dec 2003 16:09:01 -0000
@@ -350,6 +350,9 @@
 
     memset(finfo, '\0', sizeof(*finfo));
 
+    /* note that ftLastAccessTime is documented to return the
+     * the proper date but time rounded to midnight
+     */
     FileTimeToAprTime(&finfo->atime, &wininfo->ftLastAccessTime);
     FileTimeToAprTime(&finfo->ctime, &wininfo->ftCreationTime);
     FileTimeToAprTime(&finfo->mtime, &wininfo->ftLastWriteTime);

Reply via email to