X-Git-Url: http://scm.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fwatchdbg;h=ff4d3438baa6edf16c852140218aa00982ce2215;hb=8ce3e54056026253e9e4a518b317dbbd8e71bb7a;hp=3297941388ba5efecedad920b7f8bfcee3f6285b;hpb=c94ff1bf2cbe16ed59c5b273c7f6730fd7314cab;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);