Using AppModel constructor works for me:

function __construct($id = null, $table = null, $ds = null)
    {
        parent::__construct($id, $table, $ds);
        if (!defined('GLOBAL_ZONE_SET') && $this->useTable !== false)
        {
            $this->execute("SET GLOBAL time_zone = ‘+2:00′'");
            define('GLOBAL_ZONE_SET', true);
        }
    }

On Jul 4, 4:31 pm, ark0n3 <nicolabeg...@gmail.com> wrote:
> Hi everyone
> I'm going crazy for such a trivial matter. I need to run a one-time
> query at the beginning of the connection to the mysql server (SET
> GLOBAL time_zone = ‘+2:00′) but can't figure out where I need to put
> the code in the cake codebase.
>
> Many thanks in advance to whoever will help me fix this.
>
> ps i already tried in the contructor of app_model.php but got not luck
> with cake 1.2.10

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to