Index: trunk/cgi-bin/extras/db2rwhois.pl
===================================================================
--- trunk/cgi-bin/extras/db2rwhois.pl	(revision 858)
+++ trunk/cgi-bin/extras/db2rwhois.pl	(revision 859)
@@ -3,5 +3,4 @@
 # ipdb/cgi-bin/extras/db2rwhois.pl
 # Pull data from ipdb and mangle it into RWHOIS
-# Initial version 03/26/2004 kdeugau against IPDB v1
 ###
 # Revision info
@@ -102,7 +101,7 @@
   $masterblocks[$i] = new NetAddr::IP $master;
   my ($ctime,undef) = split /\s/, $mcreate;
-  ($mmod,undef) = split /\s/, $mmod;
-
-  print "$masterblocks[$i] $ctime $mmod\n";
+  my ($mtime,undef) = split /\s/, $mmod;
+
+  print "$masterblocks[$i] $ctime $mtime\n";
 
   my $date = strftime("%Y-%m-%d", localtime);
@@ -213,10 +212,10 @@
 	"Tech-Contact: $IPDB::org_techhandle\n".
 	"Created: $ctime\n".
-	"Updated: $mmod\n".
+	"Updated: $mtime\n".
 	"Updated-By: $IPDB::org_email\n";
 
   # And now the subblocks
   $ssth->execute($mid, $master) or die "nosubs: $!\n".$dbh->errstr."\n";
-  while (my ($cidr, $custid, $type, $city, $desc, $ctime, $mtime, $swip, $defcust) = $ssth->fetchrow_array) {
+  while (my ($cidr, $custid, $type, $city, $desc, $bctime, $bmtime, $swip, $defcust) = $ssth->fetchrow_array) {
 
 # We get master block info from @masterblocks.
@@ -245,6 +244,6 @@
 
     # Fix up datestamps.  We don't *really* need sub-microsecond resolution on our exports...
-    ($ctime) = ($ctime =~ /^(\d+-\d+-\d+)\s+/);
-    ($mtime) = ($mtime =~ /^(\d+-\d+-\d+)\s+/);
+    ($bctime) = ($bctime =~ /^(\d+-\d+-\d+)\s+/);
+    ($bmtime) = ($bmtime =~ /^(\d+-\d+-\d+)\s+/);
 
 # Notes:
@@ -280,6 +279,6 @@
 	"Country-Code: $IPDB::org_country\n".
 	"Tech-Contact: $IPDB::org_techhandle\n".
-	"Created: $ctime\n".
-	"Updated: $mtime\n".
+	"Created: $bctime\n".
+	"Updated: $bmtime\n".
 	"Updated-By: $IPDB::org_email\n";
     } else {
@@ -304,6 +303,6 @@
 	"Country-Code: ".($country ? $country : $IPDB::org_country)."\n".
 	"Tech-Contact: ".($tech ? $tech : $IPDB::org_techhandle)."\n".
-	"Created: $ctime\n".
-	"Updated: $mtime\n".
+	"Created: $bctime\n".
+	"Updated: $bmtime\n".
 	"Updated-By: $IPDB::org_email\n";
     } # swip
