$day = date("Y-m-d", strtotime('+1 month', time())) . " " . "$hour" . ":". "$minute" . ":" . "00" . "$ampm";
$day->setTimezone(new DateTimeZone('$ftz'));
I have a user enter a time and I want to generate a $day one month ahead of the day the script was called at the time entered
So for example if I entered 5:10pm PST
$day would become "09-14-2010 05:10:00 PM"
and then I want to convert that timezone to EST so everyones is similar and when I do the
day-> settimezone I get this error:
"Fatal error: Call to a member function setTimezone() on a non-object in"
Any ideas whats going wrong? (note $ftz = "America/New_York"; )