X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fwatchdbg;h=ff4d3438baa6edf16c852140218aa00982ce2215;hb=83445c4f6ec6c885260944a9abe648aced399c40;hp=3297941388ba5efecedad920b7f8bfcee3f6285b;hpb=426a8fc779d9d363e094fd229a8de7d4fcd25518;p=spider.git diff --git a/perl/watchdbg b/perl/watchdbg index 32979413..ff4d3438 100755 --- a/perl/watchdbg +++ b/perl/watchdbg @@ -79,10 +79,8 @@ sub printit chomp $line; $line =~ s/([\x00-\x1f\x7f-\xff])/sprintf("\\x%02X", ord($1))/eg; my ($t, $l) = split /\^/, $line, 2; - my ($sec,$min,$hour) = gmtime((defined $t) ? $t : time); - my $buf = sprintf "%02d:%02d:%02d", $hour, $min, $sec; - - print $buf, ' ', $l, "\n"; + $t = time unless defined $t; + printf "%02d:%02d:%02d %s\n", (gmtime($t))[2,1,0], $l; } } exit(0);