Get the time - but set the date to the same date every time to get a comparison.
in reply to Getting avg start time
Remember you want to compare times not dates and times so yoiu need to take the date out of the equation.
use Date::Calc qw(Date_to_Time);
my $time1 = Date_to_Time(2007,1,1,23,00,0);
my $time2 = Date_to_Time(2007,1,1,03,00,0);
my $time3 = Date_to_Time(2007,1,1,01,00,0);
my $avg = sprintf "%0.0f", (($time1+$time2+$time3)/3);
print strftime "%H:%M:%S\n", gmtime($avg);