PHP:
$date = new DateTime();
print_r ($date);
result:
DateTime Object ( [date] => 2017-11-07 15:51:26.000000 [timezone_type] => 3
[timezone] => America/Sao_Paulo )
Okay, see you later.
Database (sql). Extras table:
I need to know what standard the datetime type uses to know how to post the date and time information in the database.
Below the tests performed, and the answers obtained:
TEST 1:
$postdate = $conect -> query("INSERT INTO extras (data) values ('{$date['date']}')");
TEST2:
$postdate=$conect->query("INSERT INTO extras (data) values ('{$date}')");
Thank you in advance