fix einstellige Zahlen in im Tag zu 2 Stelligen konvertiert

This commit is contained in:
2025-02-01 16:28:29 +01:00
parent e22cf9b75d
commit 639a0327e4
2 changed files with 3 additions and 3 deletions

View File

@@ -31,7 +31,7 @@ my $dbh = DBI->connect("DBI:MariaDB:database=kram;host=edna",
"steffen", "66WXRlvF0UUV",
{'RaiseError' => 1});
my @file = read_file('sys.log');
my @file = read_file('sys.log.1');
my $ua = Mojo::UserAgent->new();
@@ -47,9 +47,9 @@ $nolandips{$first} = ();
for my $l ( @file ) {
my ( $month, $day, $h, $m, $s, $kat, $src, $dst, $port ) = $l =~ /(.*?) (.*?) (..):(..):(..) 192.*banIP\/...-wan\/drop\/(.*?):.*SRC=(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) DST=(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}).*DPT=(\d+)/;
my $dt = '';
if ( $month ) {
$day = sprintf "%02d", $day;
$month = $month2int->{lc $month};
my $mysqldt = "$year-$month-$day $h:$m:$s";
my $dt1 = DateTime->new(