Setting the timezone in MySQL on every connection using Zend PHP
Solution 1:
function setDbTimeZone(Zend_Db_Adapter_Abstract $dbAdapter, $timeZone)
{
$dbAdapter->exec("SET time_zone='$timeZone'");
}
Usage:
$dbAdapter = new Zend_Db_Adapter_Pdo_Mysql([
// ...
]);
setDbTimeZone($dbAdapter, 'US/Pacific');