![]() |
timezone Error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17) +--- Thread: timezone Error (/showthread.php?tid=62046) |
timezone Error - calcio - 06-04-2015 Hi... I get timezone error when I publish my site, but I could solve the problem with date_default_timezone_set('America/Sao_Paulo'); in my root index.php. But after do it, I tried set 'America/Sao_Paulo' in $config['time_reference'] = '', but ot works for me. What the real function $config['time_reference'] = '' of on CI? Thre is another way to set it, whitout change the php.ini? RE: timezone Error - davicotico - 06-04-2015 For Brazil is: $config['time_reference'] = 'UM3'; More info here: http://www.codeigniter.com/user_guide/helpers/date_helper.html#timezone-reference RE: timezone Error - calcio - 06-04-2015 (06-04-2015, 11:13 AM)davicotico Wrote: For Brazil is: Even with the new configuration it not works. RE: timezone Error - davicotico - 06-04-2015 (06-04-2015, 12:12 PM)calcio Wrote:(06-04-2015, 11:13 AM)davicotico Wrote: For Brazil is: Sorry, In the file application/config.php is: $config['time_reference'] = 'gmt'; In your controllers files is: $data = now(); echo mdate("%Y-%m-%d %H:%i:%s", gmt_to_local($data, 'UM3')); RE: timezone Error - calcio - 06-04-2015 Thanks @davicotito, but it has not worked yet. I'll stay with my solution. RE: timezone Error - InsiteFX - 06-04-2015 Did you set it in your php.ini file? |