From 94be7a43417f0a9b48b2e220a308e65d71b8c342 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 16 Mar 2009 09:44:44 +0000 Subject: Remove duplicated code. --- common/gettime.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'common/gettime.c') diff --git a/common/gettime.c b/common/gettime.c index c4a9d4844..1b4e435a1 100644 --- a/common/gettime.c +++ b/common/gettime.c @@ -26,6 +26,7 @@ #endif #include "util.h" +#include "i18n.h" static unsigned long timewarp; static enum { NORMAL = 0, FROZEN, FUTURE, PAST } timemode; @@ -495,6 +496,16 @@ check_isotime (const gnupg_isotime_t atime) } +void +dump_isotime (const gnupg_isotime_t t) +{ + if (!t || !*t) + log_printf (_("[none]")); + else + log_printf ("%.4s-%.2s-%.2s %.2s:%.2s:%s", + t, t+4, t+6, t+9, t+11, t+13); +} + /* Add SECONDS to ATIME. SECONDS may not be negative and is limited to about the equivalent of 62 years which should be more then -- cgit v1.2.3