httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <stodd...@raleigh.ibm.com>
Subject Canonical time in Apache 2.0
Date Tue, 04 Apr 2000 17:58:35 GMT

It is my understanding that the canonical time values used by Apache 2.0
should be APR time, i.e., microseconds since 00:00:00 Jan. 1, 1970 GMT.
Which means the saving Unix time in the ap_file_t is not the correct thing
to do. Right?

Bill

-ap_status_t ap_write(struct file_t *thefile, void *buf, ap_ssize_t *nbytes)
+ap_status_t ap_write(ap_file_t *thefile, void *buf, ap_ssize_t *nbytes)
 {
     DWORD bwrote;
     FILETIME atime, mtime, ctime;
@@ -104,9 +105,9 @@
             FlushFileBuffers(thefile->filehand);
             thefile->size = GetFileSize(thefile->filehand, NULL);
             GetFileTime(thefile->filehand, &ctime, &atime, &mtime);
-            FileTimeToAprTime(&thefile->atime, &atime);
-            FileTimeToAprTime(&thefile->mtime, &mtime);
-            FileTimeToAprTime(&thefile->ctime, &ctime);
+            thefile->atime = FileTimeToUnixTime(&atime);
+            thefile->mtime = FileTimeToUnixTime(&mtime);
+            thefile->ctime = FileTimeToUnixTime(&ctime);
         }
         *nbytes = bwrote;
         return APR_SUCCESS;
@@ -117,7 +118,7 @@

________________________________________________
Bill Stoddard stoddard@raleigh.ibm.com


________________________________________________
Bill Stoddard stoddard@raleigh.ibm.com


Mime
View raw message