From 764d1d62e0649b39ec2bafa317564fedc3acae02 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Mon, 24 Jul 2006 17:00:36 +0000 Subject: [PATCH] Added isodate() utility method (was in Test/Ping.pm) --- lib/ZOOM/IRSpy.pm | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/ZOOM/IRSpy.pm b/lib/ZOOM/IRSpy.pm index 705cf79..fea7d59 100644 --- a/lib/ZOOM/IRSpy.pm +++ b/lib/ZOOM/IRSpy.pm @@ -1,4 +1,4 @@ -# $Id: IRSpy.pm,v 1.10 2006-07-21 11:50:17 mike Exp $ +# $Id: IRSpy.pm,v 1.11 2006-07-24 17:00:36 mike Exp $ package ZOOM::IRSpy; @@ -193,7 +193,15 @@ sub _render_record { sub check { my $this = shift(); - return $this->_run_test("Main"); + my $res = $this->_run_test("Main"); + foreach my $target (sort keys %{ $this->{target2record} }) { + my $rec = $this->{target2record}->{$target}; + print STDERR "$target: zeerex='", $rec->{zeerex}, "' = \n", + $rec->{zeerex}->toString(), "\n"; + ### Write record back to database, if modified. + } + return $res; + } @@ -244,6 +252,16 @@ sub record { } +# Utility method, really nothing to do with IRSpy +sub isodate { + my $this = shift(); + 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); +} + =head1 SEE ALSO -- 1.7.10.4