In PHP I'm generating a .ical with a timestamp. Everything seems to be generating correctly but when trying to import the the file into OSX's Calendar, it's importing it by the hour and not by the exact time. In this example, the time it should be setting for is 1:30pm. Instead it's trying to import it as 1:00pm. Below is the code I'm using to generate the .ical and below that is the generated .ical.
Code used to generate:
public function createEvent($date)
{
$eol = "\r\n";
$ical = "BEGIN:VCALENDAR" . $eol .
"VERSION:2.0" . $eol .
"PRODID:-//Reminders/Relatient//NONSGML v1.0//EN" . $eol .
"BEGIN:VEVENT" . $eol .
"UID:" . md5(uniqid(mt_rand(), true)) . "@reltient.net" . $eol .
"DTSTAMP:" . gmdate('Ymd', $date).'T'. gmdate('His', $date) . "Z" . $eol .
"DTSTART:" . date('Ymd\Tgis\Z', $date) . $eol .
"DTEND:" . date('Ymd\Tgis\Z', $date) . $eol .
"SUMMARY:Appointment Reminder for ".date("m-d-Y", $date) . $eol .
"END:VEVENT" . $eol .
"END:VCALENDAR";
//set correct content-type-header
header('Content-type: text/calendar; charset=utf-8');
header('Content-Disposition: inline; filename=calendar.ics');
echo $ical;
exit;
}
The Generated File
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Reminders/Relatient//NONSGML v1.0//EN
BEGIN:VEVENT
UID:cff16d0441e2d7d9d00a39977a8ea416@reltient.net
DTSTAMP:20150506T013000Z
DTSTART:20150506T13000Z
DTEND:20150506T13000Z
SUMMARY:Appointment Reminder for 05-06-2015
END:VEVENT
END:VCALENDAR
Why would the calendar not be importing the time down to the half hour, and instead be importing it as 1:00pm to 1:00pm?
EDIT: This is the post I was following when trying to create the ical file: How can I use PHP to dynamically publish an ical file to be read by Google Calendar?
UPDATE: New Generated File Below (When importing this into calendar, it's being imported as 05-05-2015 8:30pm - 8:30pm)
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Reminders/Relatient//NONSGML v1.0//EN
BEGIN:VEVENT
UID:7813cb2429c9075704866becde76c4b7@reltient.net
DTSTAMP:20150506T013000Z
DTSTART:20150506T013000Z
DTEND:20150506T013000Z
SUMMARY:Appointment Reminder for 05-05-2015
END:VEVENT
END:VCALENDAR