summaryrefslogtreecommitdiff
path: root/src/mod_dirlisting.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2021-03-23 11:52:21 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2021-04-02 01:16:08 -0400
commita6d1dccad37f3d5f116bc209a9eb679286274c7b (patch)
tree53a252aa0d87f75a91514d20e1aa4723e8374f5a /src/mod_dirlisting.c
parentf711207d5ca9131b077a80b4d54bf2299bd6095c (diff)
downloadlighttpd-git-a6d1dccad37f3d5f116bc209a9eb679286274c7b.tar.gz
[multiple] strftime %F and %T
strftime %F for %Y-%m-%d, and %T for %H:%M:%S
Diffstat (limited to 'src/mod_dirlisting.c')
-rw-r--r--src/mod_dirlisting.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mod_dirlisting.c b/src/mod_dirlisting.c
index a7b69635..ed3e2f36 100644
--- a/src/mod_dirlisting.c
+++ b/src/mod_dirlisting.c
@@ -961,7 +961,7 @@ static int http_list_directory(request_st * const r, plugin_data * const p) {
buffer_append_string_len(out, CONST_STR_LEN("/\">"));
buffer_append_string_encoded(out, DIRLIST_ENT_NAME(tmp), tmp->namelen, ENCODING_MINIMAL_XML);
buffer_append_string_len(out, CONST_STR_LEN("</a>/</td><td class=\"m\">"));
- buffer_append_strftime(out, "%Y-%b-%d %H:%M:%S", localtime_r(&tmp->mtime, &tm));
+ buffer_append_strftime(out, "%Y-%b-%d %T", localtime_r(&tmp->mtime, &tm));
buffer_append_string_len(out, CONST_STR_LEN("</td><td class=\"s\">- &nbsp;</td><td class=\"t\">Directory</td></tr>\n"));
free(tmp);
@@ -1005,7 +1005,7 @@ static int http_list_directory(request_st * const r, plugin_data * const p) {
buffer_append_string_len(out, CONST_STR_LEN("\">"));
buffer_append_string_encoded(out, DIRLIST_ENT_NAME(tmp), tmp->namelen, ENCODING_MINIMAL_XML);
buffer_append_string_len(out, CONST_STR_LEN("</a></td><td class=\"m\">"));
- buffer_append_strftime(out, "%Y-%b-%d %H:%M:%S", localtime_r(&tmp->mtime, &tm));
+ buffer_append_strftime(out, "%Y-%b-%d %T", localtime_r(&tmp->mtime, &tm));
buffer_append_string_len(out, CONST_STR_LEN("</td><td class=\"s\">"));
buffer_append_string(out, sizebuf);
buffer_append_string_len(out, CONST_STR_LEN("</td><td class=\"t\">"));