]> granicus.if.org Git - apache/commitdiff
MOdified r:stat() to return finer time granularity.
authorGuenter Knauf <fuankg@apache.org>
Fri, 12 Apr 2013 19:15:39 +0000 (19:15 +0000)
committerGuenter Knauf <fuankg@apache.org>
Fri, 12 Apr 2013 19:15:39 +0000 (19:15 +0000)
the atime, mtime, ctime, size values ar now in mod_lua
64bit as received from apr_stat().

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1467427 13f79535-47bb-0310-9956-ffa450edef68

modules/lua/lua_request.c

index e72766b390343ccfbc96dd2624cf6b877b2d9ca3..4903a034dce37c521e2bf3fab07a7d634af2e289 100644 (file)
@@ -1210,23 +1210,23 @@ static int lua_ap_stat(lua_State *L)
         lua_newtable(L);
 
         lua_pushstring(L, "mtime");
-        lua_pushinteger(L, (ptrdiff_t)(file_info.mtime / 1000000));
+        lua_pushnumber(L, file_info.mtime);
         lua_settable(L, -3);
 
         lua_pushstring(L, "atime");
-        lua_pushinteger(L, (ptrdiff_t)(file_info.atime / 1000000));
+        lua_pushnumber(L, file_info.atime);
         lua_settable(L, -3);
 
         lua_pushstring(L, "ctime");
-        lua_pushinteger(L, (ptrdiff_t)(file_info.ctime / 1000000));
+        lua_pushnumber(L, file_info.ctime);
         lua_settable(L, -3);
 
         lua_pushstring(L, "size");
-        lua_pushinteger(L, (ptrdiff_t)file_info.size);
+        lua_pushnumber(L, file_info.size);
         lua_settable(L, -3);
 
         lua_pushstring(L, "filetype");
-        lua_pushinteger(L, (ptrdiff_t)file_info.filetype);
+        lua_pushinteger(L, file_info.filetype);
         lua_settable(L, -3);
 
         return 1;