Skip to content

Commit

Permalink
Merge pull request #7 from mzur/ical-fix
Browse files Browse the repository at this point in the history
Fixed wrong iCal output for events. #5
  • Loading branch information
mzur committed Oct 31, 2014
2 parents 1b599ec + da4ee49 commit 38e0f20
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions calendar/lib/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ public function getColNames() {
public function getICal() {
$info = $this->info;

$returnStr = "BEGIN:VEVENT \n";
$returnStr = "BEGIN:VEVENT\n";

$returnStr .= "DTSTART:".gmdate("Ymd\TH:i:s\Z",$this->begin[0])."\n";
$returnStr .= "DTEND:".gmdate("Ymd\TH:i:s\Z",
$returnStr .= "DTSTART:".gmdate("Ymd\THis\Z",$this->begin[0])."\n";
$returnStr .= "DTEND:".gmdate("Ymd\THis\Z",
($this->end)? $this->end[0] : $this->begin[0])."\n";

if (array_key_exists('summary', $info))
Expand All @@ -121,8 +121,8 @@ public function getICal() {
if (array_key_exists('location', $info))
$returnStr .= "LOCATION:".$info['location']."\n";

$returnStr .= "CLASS:PUBLIC \n";
$returnStr .= "END:VEVENT \n";
$returnStr .= "CLASS:PUBLIC\n";
$returnStr .= "END:VEVENT\n";

return $returnStr;
}
Expand Down

0 comments on commit 38e0f20

Please sign in to comment.