snantz has asked for the wisdom of the Perl Monks concerning the following question:
while (@row = $sth->fetchrow_array ){ ($host,$pol,$sched,$date,$target,$error)=@row[0,1,2,3,4,5]; $cutover=(split /:/,$time)[0]; if ($date=~/\s(\d{2})/){ $hour=$1; } #print "========= CUTOVER: $cutover DATE: $date HOUR: $hour == +======\n"; if ($hour > $cutover){ ## 12 hours are added to push the backup into the new repo +rting window (next day) $date=DateCalc("$date","+24 hours"); ###Takes 2min out of +2:30min. $date=&UnixDate($date,"%Y-%m-%d"); #print" This backup has moved to the next day: $date\n"; }else{ $date=(split /\s/,$date)[0]; #print" This backup has stayed: $date\n"; } if (defined ${$report{$host}{$pol}{$sched}{$date}}){ ${$report{$host}{$pol}{$sched}{$date}}=${$report{$host}{$p +ol}{$sched}{$date}}+$error; }else{ ${$report{$host}{$pol}{$sched}{$date}}=$error; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Changing dates
by jZed (Prior) on May 01, 2007 at 04:21 UTC | |
|
Re: Changing dates
by GrandFather (Saint) on May 01, 2007 at 05:02 UTC | |
|
Re: Changing dates
by parv (Parson) on May 01, 2007 at 06:21 UTC |