I tried this to create an iCalendar entry that Outlook could read:
use Data::ICal;
use Data::ICal::Entry::Event;
use Date::ICal;
use strict;
my $calendar = Data::ICal->new();
my $vtodo = Data::ICal::Entry::Event->new();
$vtodo->add_properties(
summary => "some fun",
description => "a fun thing to do",
dtstart => Date::ICal->new ( day => 29,
month => 6,
year => 2006,
hour => 7,
min => 15,
sec => 00
)->ical,
dtend => Date::ICal->new(day => 29,
month => 6,
year => 2006,
hour => 7,
min => 45,
sec => 00
)->ical,
);
$calendar->add_entry($vtodo);
print $calendar->as_string;
The entry looks like this:
BEGIN:VCALENDAR
PRODID:Data::ICal 0.07
VERSION:2.0
BEGIN:VEVENT
DESCRIPTION:a fun thing to do
DTEND:20060629T134500Z
DTSTART:20060629T131500Z
SUMMARY:some fun
END:VEVENT
END:VCALENDAR
Which looks reasonable to me. Outlook says "The operation failed." when I put the output into an ics file and import it.
Ideas?