diff options
author | P. 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) |
commit | 28226fed7a52114efbd43860ef1ff7794ce88931 (patch) | |
tree | 537214f4e2bab9c9a4136380a272733835b6361a /src/main.c | |
parent | 21e7e051b8c14d764bb283da59d8c04fb336ed77 (diff) | |
download | atsign-28226fed7a52114efbd43860ef1ff7794ce88931.zip atsign-28226fed7a52114efbd43860ef1ff7794ce88931.tar.gz atsign-28226fed7a52114efbd43860ef1ff7794ce88931.tar.bz2 |
datetime: WIP
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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; } |