fix problem with commands returning multiple trailing newlines

This commit is contained in:
2023-11-29 09:53:24 -06:00
committed by Andrew Johnson
parent 0cf8c934f9
commit 96857d92bc
+3
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