I have applied following things to make Default time zone to my local timezone i.e. 'Asia/Calcutta' --
1) changed in config.xml -
<general>
<locale>
<code>en_US</code>
<timezone>Asia/Calcutta</timezone>
</locale>
</general>
2) Changed in Mage.php -
if (is_readable($localConfigFile)) {
$localConfig = simplexml_load_file($localConfigFile);
date_default_timezone_set('Asia/Calcutta');
if (($date = $localConfig->global->install->date) && strtotime($date)) {
self::$_isInstalled = true;
}
}
Now when I am trying to insert any time in db using this code
Mage::getModel('core/date')->date('Y-m-d H:i:s');
,
it does not work according to current timezone and saves 5:30 hours ahead date in DB. can anyone tell me how can I do it or Have I done something wrong in default timezone settings.