diff --git a/Userland/date.cpp b/Userland/date.cpp index 951cfb21cc..d280a7434f 100644 --- a/Userland/date.cpp +++ b/Userland/date.cpp @@ -1,12 +1,16 @@ -#include -#include +#include +#include +#include int main(int argc, char** argv) { - (void) argc; - (void) argv; - time_t now = time(nullptr); + + if (argc == 2 && !strcmp(argv[1], "-u")) { + printf("%u\n", now); + return 0; + } + auto* tm = localtime(&now); printf("%4u-%02u-%02u %02u:%02u:%02u\n", tm->tm_year + 1900,