fix problem with commands returning multiple trailing newlines

This commit is contained in:
2023-04-05 09:27:42 +02:00
parent 5eff3803a8
commit b72fcff44d

View File

@@ -20,6 +20,9 @@ use POSIX qw(strftime);
use strict;
# Make sure that chomp removes all trailing newlines
$/='';
# RFC 8601 date+time w/ zone (eg "2014-08-29T09:42-0700")
my $tfmt = '%Y-%m-%dT%H:%M';
$tfmt .= '%z' unless $^O eq 'MSWin32'; # %z returns zone name on Windows