I am creating order programmatically on magento 2.2 and using this

$order = $this->orderRepository->get($order_id);

where $this->orderRepository referes to \Magento\Sales\Api\OrderRepositoryInterface $orderRepository

The created_date comes from an excel and has the date (2019-01-11 18:43:08) , but created_at coloumn under sales_order it is saved as 2019-01-12 00:13:07 . enter image description here

. Here are the timezone settings that i have in backend enter image description here

I need to have the same dates in order that i have in csv and and same need to be reflected on other places like order grid. Please advice

  • which version you have using?
    – Amit Bera
    Feb 20, 2019 at 7:46
  • Hi amit i am using magento 2.2.5 Feb 21, 2019 at 5:45
  • up !!!! , I have the same problem when created_at in sales_order DB lately with purchase date in Orders Grid Admin Magento 2.2.3 Jun 24, 2020 at 16:26


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.