Forward porting iCal end day date math fix.

This commit is contained in:
Colin Kuskie 2009-08-03 23:06:14 +00:00
parent 4ecc2c725e
commit 2892aedf71
2 changed files with 4 additions and 1 deletions

View file

@ -273,7 +273,9 @@ sub execute {
elsif ($dtend =~ /(\d{4})(\d{2})(\d{2})/) {
my ($year, $month, $day) = $dtend =~ /(\d{4})(\d{2})(\d{2})/;
$properties->{endDate} = join "-",$year,$month,$day;
my $endDateLet = WebGUI::DateTime->new( year => $year, month => $month, day => $day);
$endDateLet->subtract( days => 1 );
$properties->{endDate} = $endDateLet->toDatabaseDate;
}
# If we can't parse it, forget the whole event
elsif ($dtend) {