1

I have a very weird problem with Catalog Price Rules. As you know normally when price rules are applied, they are applied for current day, past day, and next day. The problem is that the price rules are generated only for current day, and two past days. So if taking today example on catalogrule_product_price on rule_date row the dates set are:

2014-03-12

2014-03-13

2014-03-14 - today date

Instead of:

2014-03-13

2014-03-14 - today date

2014-03-15 - tomorrow

Any suggestions?

3 Answers3

2

This happens when your database is using a different time zone to your Magento site. You need to check and verify that they are both using the same time zone.

For Magento you can check this from System -> Configuration -> Locale Options.

For your database, you can run the following query to the the current local time: SELECT NOW();

If these don't match then you will get the behaviour described above (rules are not correctly set +/- current day). Most likely you need to correct the timezone that your database is using.

Edit: it seems that the best way to handle this is to ensure that you set the global timezone to UTC in Magento, and then set the timezone for your individual site(s) to the local time in your region. Your database should also be set to default to UTC.

Edit 2: Also make sure that the default locale set in app/etc/config.xml is correct.

Community
  • 1
  • 1
solarissmoke
  • 30,039
  • 14
  • 71
  • 73
0

Could it be related to time zones? Either the time zone of your server clock or the time zone set in Magento?

Malachy
  • 1,580
  • 1
  • 11
  • 9
  • when i type "date" in SSH it gives me the correct date UTC. Also i had set the timezone of the store to be UTC because normal timezone was Australia Central and because the price rules where set only in the past i had a 9hour time when the prices won't update. – Alexandru Burdulea Mar 15 '14 at 13:40
0

Try setting your Default Store Timezone to match your server timezone.

enter image description here

enter image description here

srgb
  • 4,783
  • 6
  • 29
  • 45