Any input would be appreciated, look at this and suggest a solution.
This code is used in a module, and the module creator is no longer here. It imports FB events into Dolphin
if ($iUser)
$ID = $iUser;
else
$ID = (int) $this->me->id;
$nUri = 'https://graph.facebook.com/' . $ID . '/events?access_token=' . $this->getMyToken() . '&limit=99';
$json = $this->get($nUri);
foreach ($json->data as $data) {
date_default_timezone_set('America/Los_Angeles');
$startTimeA = strtotime($data->start_time);
$startTime = ($startTimeA === false) ? '0000-00-00 00:00:00' : date('dS F Y h:i', $startTimeA);
$endTimeA = strtotime($data->end_time);
$endTime = ($time === false) ? '0000-00-00 00:00:00' : date('dS F Y h:i', $endTimeA);
$name = $data->name;
$name = str_replace("'", " ", $name);
$name = str_replace('"', '', $name);
$location = $data->location;
$location = str_replace("'", " ", $location);
$location = str_replace('"', '', $location);
$json_array .= "['$name', '$data->id', '$this->facebookGraphUrl','$location','$startTime','$endTime'],";
I need to figure out why my times are off, no matter the change I make here, " date_default_timezone_set('America/Los_Angeles');"
it does not help, I have changed to EST, CST, UST... nothing changes the dates when imported.