From 52efab46a4e723161fc1162a1bb73788507a70c8 Mon Sep 17 00:00:00 2001 From: "A. Schulze" Date: Tue, 26 Dec 2023 10:01:43 +0100 Subject: [PATCH 1/2] duration --- reports/opendmarc-expire.in | 6 ++++-- reports/opendmarc-reports.in | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/reports/opendmarc-expire.in b/reports/opendmarc-expire.in index 326a5a38..ebc0ab65 100755 --- a/reports/opendmarc-expire.in +++ b/reports/opendmarc-expire.in @@ -54,6 +54,8 @@ my $def_maxage = 180; my $rows; my $maxage; +my $now = time(); + ### ### NO user-serviceable parts beyond this point ### @@ -192,7 +194,7 @@ if ($maxage <= 0) if ($verbose) { - print STDERR "$progname: started at " . localtime() . "\n"; + print STDERR "$progname: started at " . localtime($now) . "\n"; } my $dbi_dsn = "DBI:" . $dbscheme . ":database=" . $dbname . @@ -564,7 +566,7 @@ if ($alltables) if ($verbose) { - print STDERR "$progname: terminating at " . localtime() . "\n"; + print STDERR "$progname: terminating at " . localtime() . "(duration=" . scalar(time() - $now) . ")\n"; } $dbi_h->disconnect; diff --git a/reports/opendmarc-reports.in b/reports/opendmarc-reports.in index 69a2194b..a9bfd58f 100755 --- a/reports/opendmarc-reports.in +++ b/reports/opendmarc-reports.in @@ -1061,7 +1061,7 @@ $dbi_s->finish; if ($verbose) { - print STDERR "$progname: terminating at " . localtime() . "\n"; + print STDERR "$progname: terminating at " . localtime() . "(duration=" . scalar(time() - $now) . ")\n"; } $dbi_h->disconnect; From 9e9734eb7bd351675c647ac9f54c193ab71bc88d Mon Sep 17 00:00:00 2001 From: "A. Schulze" Date: Tue, 26 Dec 2023 13:40:44 +0100 Subject: [PATCH 2/2] space --- reports/opendmarc-expire.in | 2 +- reports/opendmarc-reports.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reports/opendmarc-expire.in b/reports/opendmarc-expire.in index ebc0ab65..1d3e226e 100755 --- a/reports/opendmarc-expire.in +++ b/reports/opendmarc-expire.in @@ -566,7 +566,7 @@ if ($alltables) if ($verbose) { - print STDERR "$progname: terminating at " . localtime() . "(duration=" . scalar(time() - $now) . ")\n"; + print STDERR "$progname: terminating at " . localtime() . " (duration=" . scalar(time() - $now) . ")\n"; } $dbi_h->disconnect; diff --git a/reports/opendmarc-reports.in b/reports/opendmarc-reports.in index a9bfd58f..675efee5 100755 --- a/reports/opendmarc-reports.in +++ b/reports/opendmarc-reports.in @@ -1061,7 +1061,7 @@ $dbi_s->finish; if ($verbose) { - print STDERR "$progname: terminating at " . localtime() . "(duration=" . scalar(time() - $now) . ")\n"; + print STDERR "$progname: terminating at " . localtime() . " (duration=" . scalar(time() - $now) . ")\n"; } $dbi_h->disconnect;