summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 71f0d9b..62e00dd 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,5 +1,16 @@
+#include <stdio.h>
+#include <time.h>
+#include "datetime.h"
+
int
main(int argc, char *argv[])
{
+ struct tm tm;
+
+ datetime_parse(argc - 1, argv + 1, &tm);
+ printf("%d-%02d-%02dT%02d:%02d:%02d\n",
+ tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
+ tm.tm_hour, tm.tm_min, tm.tm_sec);
+
return 0;
}