X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=lib%2FZOOM%2FIRSpy%2FTest%2FPing.pm;h=f81aaaf8a1c3840160fa6ab4d220f37988b1351d;hb=2f34c4f75b58742f952cea924bd94d5499928ee0;hp=a105a28094017a535bdc59c787b79074009e58ba;hpb=d3d987e7e5121e6a789880f5f99aba07ad942531;p=irspy-moved-to-github.git diff --git a/lib/ZOOM/IRSpy/Test/Ping.pm b/lib/ZOOM/IRSpy/Test/Ping.pm index a105a28..f81aaaf 100644 --- a/lib/ZOOM/IRSpy/Test/Ping.pm +++ b/lib/ZOOM/IRSpy/Test/Ping.pm @@ -1,4 +1,4 @@ -# $Id: Ping.pm,v 1.9 2006-07-24 16:16:29 mike Exp $ +# $Id: Ping.pm,v 1.11 2006-09-13 16:29:55 mike Exp $ # See the "Main" test package for documentation @@ -32,23 +32,14 @@ sub not_connected { maybe_connected(@_, 0) } sub maybe_connected { my($conn, $irspy, $rs, $event, $ok) = @_; - my $rec = $irspy->record($conn); $irspy->log("irspy_test", $conn->option("host"), ($ok ? "" : " not"), " connected"); + my $rec = $irspy->record($conn); $rec->append_entry("irspy:status", "" . - isodate(time()) . ""); + $irspy->isodate(time()) . ""); $conn->option(pod_omit => 1) if !$ok; return 0; } -sub isodate { - my($time) = @_; - - my($sec, $min, $hour, $mday, $mon, $year) = localtime($time); - return sprintf("%04d-%02d-%02dT%02d:%02d:%02d", - $year+1900, $mon+1, $mday, $hour, $min, $sec); -} - - 1;