summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/main.c b/src/main.c
index 5e1f799..474f662 100644
--- a/src/main.c
+++ b/src/main.c
@@ -57,18 +57,6 @@ static const struct option LONGOPTS_[] = {
};
#endif
-static struct tm EPOCH_ = {
- .tm_sec = 0,
- .tm_min = 0,
- .tm_hour = 0,
- .tm_mday = 1,
- .tm_mon = 0,
- .tm_year = 70,
- .tm_wday = 4,
- .tm_yday = 0,
- .tm_isdst = -1,
-};
-
static void
_print_usage(FILE *stream, const char *program_name)
{
@@ -287,8 +275,7 @@ main(int argc, char * const argv[])
free(buf);
if (dbg == true) {
- now = timegm(&EPOCH_);
- dif = difftime(arg, now);
+ dif = datetime_diff_epoch(arg);
printf("%" PRId64 "\n", (int64_t) dif);
return EXIT_SUCCESS;
}