PHP warning

date() [<a href='function.date'>function.date</a>]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for '-03/-3.0/no DST' instead

/home/storage/2/c5/ed/gustavomury2/public_html/extranet/protected/models/Agendamento.php(13)

01 <?php
02 
03 Yii::import('application.models._base.BaseAgendamento');
04 
05 class Agendamento extends BaseAgendamento
06 {
07     public static function model($className=__CLASS__) {
08         return parent::model($className);
09     }
10     
11     
12     public function init(){
13         $this->data = date('d/m/Y');
14   
15     }
16     
17     public function beforeSave(){
18         if($this->data != "")
19             $this->data = Util::formataDataBanco($this->data);
20         //{{beforeSave}}
21         return parent::beforeSave();
22     }
23     
24     public function afterFind(){
25         if($this->data != "")

Stack Trace

#0
+
 /home/storage/2/c5/ed/gustavomury2/public_html/extranet/protected/models/Agendamento.php(13): date("d/m/Y")
08         return parent::model($className);
09     }
10     
11     
12     public function init(){
13         $this->data = date('d/m/Y');
14   
15     }
16     
17     public function beforeSave(){
18         if($this->data != "")
#2
+
 /home/storage/2/c5/ed/gustavomury2/public_html/agendamento_page.php(6): CActiveRecord->__construct()
01 <?
02 /*********************************************************
03 *Controle de versao: 2.5
04 *********************************************************/
05 include_once("extranet/autoload.php");
06 $model = new Agendamento();
07 if(is_array($_POST['Agendamento'])){
08     $model->attributes = $_POST['Agendamento'];
09     $model->data = date('d/m/Y H:i:s');
10     $model->ip = $_SERVER['REMOTE_ADDR'];
11     
#3
+
 /home/storage/2/c5/ed/gustavomury2/public_html/RequestManager.php(121): require_once("/home/storage/2/c5/ed/gustavomury2/public_html/agendamento_page....")
116         
117         $this->setRoutes($routes);
118         $return = $this->defineRoute();
119         
120         if($return['status']){
121             require_once($return['file']);
122             exit;
123         }
124         header('location: '.$this->getBaseUrl().DIRECTORY_SEPARATOR.$this->default_route);
125         exit;
126     }

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for '-03/-3.0/no DST' instead in /home/storage/2/c5/ed/gustavomury2/public_html/extranet/yii/views/exception.php on line 217
2025-05-01 16:28:03 Apache Yii Framework/1.1.13