summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2022-03-29 19:08:36 (EDT)
committer P. J. McDermott <pj@pehjota.net>2022-03-29 19:08:36 (EDT)
commit5d52752e0cb715a1af4095c890dc623ce369f1ac (patch)
tree8fba921b3e5deba004f73e7f480c615431ab32cd /src
parent182d541fd660642544d66f122c61c7342ba89c21 (diff)
downloadatsign-5d52752e0cb715a1af4095c890dc623ce369f1ac.zip
atsign-5d52752e0cb715a1af4095c890dc623ce369f1ac.tar.gz
atsign-5d52752e0cb715a1af4095c890dc623ce369f1ac.tar.bz2
main: If debugging, print formatted time
Not seconds since Epoch.
Diffstat (limited to 'src')
-rw-r--r--src/main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 93689d3..3ce51dc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -18,7 +18,6 @@
*/
#include <errno.h>
-#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
@@ -274,8 +273,13 @@ main(int argc, char * const argv[])
#if defined(ENABLE_TESTS) && ENABLE_TESTS
if (dbg == true) {
- dif = datetime_diff_epoch(arg);
- printf("%" PRId64 "\n", (int64_t) dif);
+ printf("%04d-%02d-%02d %02d:%02d:%02d\n",
+ arg_tm.tm_year + 1900,
+ arg_tm.tm_mon + 1,
+ arg_tm.tm_mday,
+ arg_tm.tm_hour,
+ arg_tm.tm_min,
+ arg_tm.tm_sec);
return EXIT_SUCCESS;
}
#endif