1

We have migrated M1 customers and orders from M2.3.1 successfully with the datamigration tool but we are facing some discrepancy with the time differences.

The best example is customer create_at & updated_at fields for a single customer.

M1 DB:

+----------------------------+---------------------+----------------------------------------+
 | email                          | created_at          | updated_at                           |
+----------------------------+---------------------+----------------------------------------+
| abc@stackexchange.com | 2016-04-08 21:41:29 | 2016-04-08 21:41:29 |
+----------------------------+---------------------+----------------------------------------+

M2 DB:

   +----------------------------+---------------------+----------------------------------------+
     | email                      | created_at          | updated_at                           |
    +----------------------------+---------------------+----------------------------------------+
    | abc@stackexchange.com | 2016-04-09 01:41:29 | 2016-04-09 01:41:29 |
    +----------------------------+---------------------+----------------------------------------+

What are the steps needs to be verify and how to fix this please advise

1

If your Magento 1 server has the time zone set to anything other than UTC, you must configure the offset to migrate timestamp fields. To transform time to a different time zone, use the Data Migration Tool’s \Migration\Handler\Timezone handler.

In the following example, the Magento 1 server timezone is UTC-7. To convert the customer account creation date properly, add the following rule to map-customer.xml:

<transform>
          <field>customer_entity.created_at</field>
          <handler class="\Migration\Handler\Timezone">
              <param name="offset" value="-7" />
          </handler>
      </transform>

for sales order date like this:

<transform>
          <field>sales_flat_order.created_at</field>
          <handler class="\Migration\Handler\Timezone">
              <param name="offset" value="-7" />
          </handler>
      </transform>
0

The different time is from the configuration timezone in two different Magento versions Magento 1 and Magento 2.

You write a query to reduce the date in Magento 2 to "1":

UPDATE  table_name set updated_at = DATE_SUB(updated_at, INTERVAL 1 DAY), created_at = DATE_SUB(created_at, INTERVAL 1 DAY)

Please check and let me know in case of any issue.

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.