i am working on a Cakephp 2.3 .. here is my code
class MessagesController extends AppController{
public $helpers = array('Time');
public function messages(){
$datetime= $this->Message->getDatetime($userid); //$datetime = 2013-06-14 10:28:00
$time = $this->Userinfo->getTimeZone($userid); //$time = 5.00
$finaltime = $this->Time->format('Y-m-d H:i:s', $dateTime, NULL, $time);
exit();
}
it is giving me
Fatal error: Call to a member function format() on a non-object
anybody know what i am doing wrong?