I currently have problem regarding incorrect date and time inserting on my database, I currently use laravel and in my app.php the 'timezone' => 'Canada/Central', today I insert an order which my time and date is 11:23PM / 09/06/2019 then after I insert the order in database the order_date is incorrect based on my time.
My Time and Date:
Order date and time Inserted in database:
I will share to you guys my script and code:
$now = new DateTime();
DB::insert('INSERT INTO order_properties (customer_id,order_ship_address,delivery_status,order_ship_province,order_date,transaction_number)
VALUES (?,?,?,?,?,?) ',[
$hidden_customer_id,
$hidden_customer_address,
'Processing',
Auth::user()->manager_location_assign,
$now,
$sessionTransactionNumber
]);