Setting a timezone?

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.

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 10 Nov 2012

why its in a loop?

so much to do....
Quote · 10 Nov 2012

 

why its in a loop?

 this is a snippet of code.. 

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 10 Nov 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.