How to Correct Timezone Issues for Magento

Overview

When using date-based logic on Magento, the available delivery days may be incorrect and the cut-off time may not be obeyed correctly. For example, you may have selected Sunday as a blackout delivery day but in cart Saturday is blacked out and Sunday is still available.

Cause of a Timezone Issue

This is caused by a mismatch in the time zones between ShipperHQ and Magento. For example, if the selected timezone in ShipperHQ is set to GMT+2, for example, then Magento will also need to be set to GMT+2.

This also occurs when using a UK timezone. In the summer time Magento does not account for Daylight Savings Time and remains at GMT+0. However, if you have ShipperHQ set to “Europe/London” that particular timezone does account for daylight savings so it uses GMT+1 during BST.

The available dates are offset because the days are calculated from 00:00:00 to 23:59:59. So, when BST (GMT+1) is 00:00:00 on one day, GMT+0 is 23:00:00 from the previous day.

When using London’s time zone in ShipperHQ this can be tested by changing the timezone within Magento to Cape Verde Standard Time, which is specifically GMT+1.

Solution

To resolve this the time zones will need to match between ShipperHQ and Magento.

For example, a user in the UK would need to:

  1. Set Magento to: GMT
  2. Set ShipperHQ to: GMT
  3. During BST: Decrease cutoff times by 1h
  4. During GMT: Set cutoff time to actual time you would like the cut off to apply

Was this doc helpful?