phpMyAdmin datetime只接受12小时格式

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.

Try to change your data/time format in db using:

SET GLOBAL datetime_format ='%Y-%m-%d %H:%i:%s';
SET GLOBAL time_format ='%H:%i:%s';

before you can also check which format you use:

show variables like 'date%format';

use mysql DATE_FORMAT function

SELECT DATE_FORMAT(order_date,'%Y-%m-%d %r'), order_date FROM my_table 

for more about DATE_FORMAT function - read more