When modules are defined in a database table,

where is the best place to call Yii::app()->setModules()?

There are probably better ways, but I usually perform those application level preps in index.php:

$app = Yii::createWebApplication($config);

// we need to set this to UTC, regardless of default timezone 

// which is only for display. UTC is what timestamps etc. are using.


// Do other global app stuff..


comes to my mind at first, too

I blogged my simple solution, see