Magento Themes and Magento Extensions

How To Setup, Configure & Manage Time Zones In Magento


Lately many people asked us questions on how to manage & setup timezone for their Magento store and why Magento uses UTC (coordinated Universal Time). Now, you must be having few other sites running as per your timezone requirements so why your Magento powered store has to rely on UTC? Answer is simple, Magento is built to run on most of the platforms so if you run your store on cloud servers, the server default will be UTC unless specified otherwise. Magento sets script’s time relative to server time which finally gets converted to UTC. So each Magento store (database-wise) is synced to UTC which will automatically help with cross-server synchronization.
Setting Up Different Timezones For Different Stores In Magento
Most of the big stores run multiple stores to target different customers from different parts of the world. For an example your default store might be running on Pacific Timezone but what about Australia or UK customers? Magento has  a solution to this problem. You can setup timezones for each store you have by navigating to  Admin Panel => System => Configuration => General => Locale Options => Timezone you can set different timezones for different countries or as per your own custom requirements. Just keep in mind that Admin Panel will use your site’s default timezone so don’t get confused with multi store’s timezone and admin timezone. You can anytime change the admin timezone from here System => Configuration => General => Locale Options =>Timezone

Just edit app/code/core/Mage/Core/Model/Locale.php this file and see your current store’s settings

 * Create Zend_Date object with date converted to store timezone and store Locale
 * @param   mixed $store Information about store
 * @param   string|integer|Zend_Date|array|null $date date in UTC
 * @param   boolean $includeTime flag for including time to date
 * @return  Zend_Date
public function storeDate($store=null, $date=null, $includeTime=false)
    $timezone = Mage::app()->getStore($store)->getConfig(self::XML_PATH_DEFAULT_TIMEZONE);
    $date = new Zend_Date($date, null, $this->getLocale());
    if (!$includeTime) {
    return $date;
I would love to hear your experiences of setting up timezones in  Magento.

Leave a Reply

You must be logged in to post a comment.