diff --git a/CODE/cgi-bin/sefran3.pl b/CODE/cgi-bin/sefran3.pl index 0660d10a..8a7c7158 100755 --- a/CODE/cgi-bin/sefran3.pl +++ b/CODE/cgi-bin/sefran3.pl @@ -471,11 +471,13 @@ =head1 Query string parameters # case B: event has started in a previous hour } else { $deb_evt = 2; + my $hdeb = $MC{hour}; + $hdeb -= 24 if ($hdeb > $hh); # solves event crossover a day # case B1: more than 3 hours overlap = full width - if ($h0 + $dh > $hh - $MC{hour} + 1) { + if ($h0 + $dh > $hh - $hdeb + 1) { $dur_evt = $SEFRAN3{HOURLY_WIDTH}; } else { - $dur_evt = $SEFRAN3{HOURLY_WIDTH}*($h0 + $dh - ($hh-$MC{hour})); + $dur_evt = $SEFRAN3{HOURLY_WIDTH}*($h0 + $dh - ($hh-$hdeb)) + 1; } } print "