X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fwatchdbg;h=ff4d3438baa6edf16c852140218aa00982ce2215;hb=83445c4f6ec6c885260944a9abe648aced399c40;hp=348ac8fe7bbbe5ab49101d635c429b9a66113ed3;hpb=f0910da57e166acb22e83de4e4b771d175074c80;p=spider.git diff --git a/perl/watchdbg b/perl/watchdbg index 348ac8fe..ff4d3438 100755 --- a/perl/watchdbg +++ b/perl/watchdbg @@ -23,7 +23,7 @@ BEGIN { } use IO::File; -use DXVars; +use SysVar; use DXUtil; use DXLog; @@ -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);