diff --git a/Userland/ls.cpp b/Userland/ls.cpp index a431cf8af5..2ce036152f 100644 --- a/Userland/ls.cpp +++ b/Userland/ls.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -162,7 +163,14 @@ int do_dir(const char* path) else printf(" %10u ", st.st_size); - printf(" %10u ", st.st_mtime); + auto* tm = localtime(&st.st_mtime); + printf(" %4u-%02u-%02u %02u:%02u:%02u ", + tm->tm_year + 1900, + tm->tm_mon + 1, + tm->tm_mday, + tm->tm_hour, + tm->tm_min, + tm->tm_sec); print_name(st, de->d_name, pathbuf);