Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My company just recent moved our MySQL database to and instance Aamazon Web Service's RDS.

The problem is the application relies on time zone information and the timezone in MySQL (under RDS) is set to UTC and can't be changed.

So I'm wondering how to change it on a perconnection basis in my Zend Framework.

I'm not really sure where to start with this so any suggestions?

share|improve this question
function setDbTimeZone(Zend_Db_Adapter_Abstract $dbAdapter, $timeZone)
    $dbAdapter->exec("SET time_zone='$timeZone'");


$dbAdapter = new Zend_Db_Adapter_Pdo_Mysql([
    // ...

setDbTimeZone($dbAdapter, 'US/Pacific');
share|improve this answer
share|improve this answer
This helps a ton. But how exactly would I pass it my Zend Frame work class. I think this is what I actually asking. Maybe I should post this question on a Zend Developers forum. – Philip Isaacs Nov 9 '12 at 18:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.