user1682863
user1682863

Reputation: 1

magento 's cookie time not the same to timezone

I have searched for more than two hours, my problem is:

I need to use cookies but I found my magento's cookie time is not right. I have reinstalled my magento and in the system/configuration/general/locale options choose my timezone.

But when I went to my website, I found the cookies time still using GMT and the Path is not right too..(and they are magento's cookies "frontend" and "adminhtml", not the cookies I set, since I need to fix the cookie time first and them start to work on my own cookies).

But I use <?php echo Mage::getModel('core/date')->date();?> in the header.phtml to print my time, and this time is right.

So it means the place which set the cookies don't use the timezone.

Upvotes: 0

Views: 529

Answers (1)

benmarks
benmarks

Reputation: 23205

And are you sure that the settings haven't been set at a lower configuration scope (website or store level)? Use the GUI tool in upper left corner of System > Configuration screen or use a query:

SELECT * FROM `core_config_data`
WHERE `scope` != 'default'
  AND `path` LIKE 'web/cookie%';

If you get any results for the above query, there are values set at the store or website level.

Upvotes: 2

Related Questions