summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2021-08-28 17:53:27 (EDT)
committer P. J. McDermott <pj@pehjota.net>2021-08-29 12:40:53 (EDT)
commit28226fed7a52114efbd43860ef1ff7794ce88931 (patch)
tree537214f4e2bab9c9a4136380a272733835b6361a /src/main.c
parent21e7e051b8c14d764bb283da59d8c04fb336ed77 (diff)
downloadatsign-28226fed7a52114efbd43860ef1ff7794ce88931.zip
atsign-28226fed7a52114efbd43860ef1ff7794ce88931.tar.gz
atsign-28226fed7a52114efbd43860ef1ff7794ce88931.tar.bz2
datetime: WIP
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;
}