Step 6 – Datetime format error

Hi, getting this error. Looks like it starts to import 7x 100 records but then stops. I’ve tried to look in M1 database for that customers with that date, but it is nowhere to be found. 
 
[Processing][run] Step #6 migration completed with 100 record(s) in the ‘customer_entity’ table.2022/09/07 12:18:52 --
[Processing][run] Step #6 migration completed with 100 record(s) in the ‘customer_entity’ table.2022/09/07 12:18:52 [error] [ub_data_migration] CDbCommand failed to execute the SQL statement: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: ‘2018-03-25 02:01:09’ for column `magento2elgrossistendk_m2_2e886a37_live`.`customer_address_entity`.`created_at` at row 1. The SQL statement executed was: INSERT INTO `customer_address_entity` (`is_active`, `entity_id`, `parent_id`, `created_at`, `updated_at`, `country_id`, `firstname`, `lastname`, `street`, `telephone`, `city`) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5, :yp6, :yp7, :yp8, :yp9, :yp10)
 
Any tips on how i move on with this? 
Timezone is: CET Copenhagen on M2 and M1. 

3 answers

Profile photo of Mall Staff 181800.00 $tone September 7, 2022
Public

Hi there,

Invalid datetime format: 1292 Incorrect datetime value: ‘2018-03-25 02:01:09’ for column

To solve that issue, you can try with steps:
+ Open the configuration file at path: pub/ub-tool/protected/config/db.php
and find the code line:

'class' => 'CDbConnection',

and replace by code lines:

'class' => 'CDbConnection',
'initSQLs'=>array(
"SET time_zone = '+0:00'"
)

+ Once done, you continue with data migration in step #6:

php -f bin/ubdatamigration run --step=6;

Regards,
Mall.

#1
Profile photo of ubdev Staff 93040.00 $tone September 9, 2022
Public

Hi

Worked, thank you! 

We are glad to be able to assist you.
If you have additional questions, please fell free to reach out to us anytime.

 

#3

Please login or Register to Submit Answer

Written By

Comments