In my php code I insert datetime
to my table like this:
php code:
$doinmysql = "INSERT INTO my_table (id,order_date) VALUES('0','date("Y-m-d H:i:s")')";
mysql_query($doinmysql);
if I echo date("Y-m-d H:i:s")
I get "2015-08-27 15:48:19"
- a time in 24 hour format, but in the db u have: "2015-08-27 03:48:19"
- a time in 12 hour format.
any idea how I can solve this?
thanks!!!
edit:
if i run the same query in sql tab in phpmyadmin the date is insert in 24 hour format, still from my php to db he change.