php - How do I convert the following to insert into mysql? -


i have following date/time: thu, 26 jun 2014 07:13:32 +0000

i need convert format inserting mysql: 2014-06-26 07:13:32

how go doing so?

i tried doing date("y-m-d h:i:s", strtotime(thu, 26 jun 2014 07:13:32)) gives me wrong time (specifically hour).

this code works fine me , gives result specify above:

<?php date_default_timezone_set("utc");  print date("y-m-d h:i:s", strtotime("thu, 26 jun 2014 07:13:32")); 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

jquery - Keeping Kendo Datepicker in min/max range -