1
0
mirror of https://github.com/lxsang/antd-lua-plugin synced 2025-09-01 16:52:07 +02:00

add cache control to file

This commit is contained in:
lxsang
2020-01-10 18:29:29 +01:00
parent 21f55f1000
commit ac99eedc71
3 changed files with 16 additions and 8 deletions

View File

@@ -255,13 +255,13 @@ static int l_file_stat(lua_State* L, const char* path)
//ctime
lua_pushstring(L,"ctime");
strftime(date, sizeof(date), "%Y-%m-%dT%H:%M:%S", localtime(&(st.st_ctime)));
timestr(st.st_ctime,date,sizeof(date),"%a, %d %b %Y %H:%M:%S GMT",1);
lua_pushstring(L,date);
lua_settable(L,-3);
//mtime
lua_pushstring(L,"mtime");
strftime(date, sizeof(date), "%Y-%m-%dT%H:%M:%S", localtime(&(st.st_mtime)));
timestr(st.st_mtime,date,sizeof(date),"%a, %d %b %Y %H:%M:%S GMT",1);
lua_pushstring(L,date);
lua_settable(L,-3);