apps: Add a new date utility

This program tells you the current date and time :)
This commit is contained in:
apio 2022-10-30 09:09:24 +01:00
parent e2b5c1bfdd
commit e705810af3
2 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,4 @@
APPS := init sh uname uptime hello ps ls args cat stat su session
APPS := init sh uname uptime hello ps ls args cat stat su session date
APPS_DIR := $(LUNA_ROOT)/apps
APPS_SRC := $(APPS_DIR)/src

9
apps/src/date.c Normal file
View File

@ -0,0 +1,9 @@
#include <stdio.h>
#include <time.h>
int main()
{
time_t date = time(NULL);
fputs(ctime(&date), stdout);
}