I am creating a custom RSS feed using the <dc:date> field to display event dates. The dates and times are split up in the database and I am having troubles getting them to display properly in the feed. The StartDate is fine - I just need to add the vcalStartTime field so the time shows up. Or have no time at all show up.
I think I need to somehow use the $newdate2 value (see code snippet) but when I add it to my $date I get the issue where all dates and times are set to Dec 31 1969 (so its wrong). If I remove the time value from the date() I still get a 5:00 AM time on everything.
Any suggestions are appreciated!
$newdate2 = $feed['StartDate'] . T . $feed['vcalStartTime'] .Z ;
$date = explode("-", $feed['StartDate']);
list($year, $month, $day) = $date;
echo "<dc:date>" . date("D, j M Y H:i:s T", strtotime("$month/$day/$year")) ."</dc:date>\n";