1

I run 4 stores with the following timezones:
Store A: GMT -7 hours
Store B: GMT 0 hours
Store C: GMT +8 hours
Store D: GMT +4 hours

Product price reindex starts at 2:00am and 9:00am (GMT +8 hours). Recently some customers are complaining that they do not see the discounts at approx 5:00am (GMT +8 hours) in Store C or Store D.

When should the price reindex start to ensure all the discounts are effective across all the available timezones?

Edit: I changed the default timezone on the MySQL database to UTC in the testing environment (before the timezone was not set and therefore MySQL was using the Linux server's timezone which was GMT +8 hours). The discount rules start to disappear after 12:00am (GMT +8 hours).

The reason why the production environment had the database set to UTC was that the Magento MySQL was hosted in Amazon RDS. The default timezone was set to UTC and there's no way to change it.

So it seems that the default/admin timezone has to match that of the Magento database. Unfortunately there's no UTC timezone in Magento. I set it to GMT Standard (Europe/London) but now I found that the time is actually GMT +1 hour (following BST?). I am running Magento CE version 1.8.1.0.

5
  • Are these separate frontend nodes in the respective time zone, but using the same database? Or just one installation all in the save time zone?
    – user4351
    May 26 '15 at 7:31
  • These stores use the same database, however their timezones are set differently in the same Magento installation.
    – Saul Karl
    May 26 '15 at 8:22
  • In default config, the timezone is set to GMT +8 hours. The database timezone is set to UTC. Could this be the problem? In our testing environment, the timezones are exactly the same, but the database timezone is also set to GMT +8 hours. Magento in the testing environment can retain discount prices throughout the day.
    – Saul Karl
    May 28 '15 at 15:14
  • This is exactly the problem. The /global/ time zone in Magento should match the database. The problem is explained in this article
    – user4351
    May 28 '15 at 17:34
  • If the database is set to UTC, what should the global timezone be set to in Magento? I set it to GMT Standard Europe/London but the time is off by 1 hour.
    – Saul Karl
    May 29 '15 at 13:54
1

I may have a unique setup which has certain constraints:

  • database timezone is set to UTC and cannot be changed
  • Magento admin/default timezone is set to GMT +8 hours
  • Store A is set to GMT -7 hours
  • Store B is set to GMT 0 hours
  • Store C is set to GMT +8 hours
  • Store D is set to GMT +4 hours

I have tried changing the Magento admin/default timezone to GMT Standard (Europe/London) but still the discounts will disappear after 12:00am GMT +8 hours and won't re-appear until 8:00am GMT +8 hours when the cron job apply catalog update runs. Running this cron job before 8:00am GMT +8 hours won't have any effect.

The solution was to modify a line of code in Refresh.php based on the following suggestion: https://stackoverflow.com/questions/25280095/magento-catalog-price-rule-disappears-at-night

The cron job apply catalog update is now set to 12:00am GMT +8 hours. The discounts will remain throughout the day (GMT +8 hours) for all 4 stores.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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