How can I convert a js Date (like this Sun Jul 13 2014 07:00:00 GMT+0200 (EET)) to MySQL format (like this 2014-07-13 07:00:00) using php ?
Sun Jul 13 2014 07:00:00 GMT+0200 (EET)
2014-07-13 07:00:00
Javascript: This get this time right now in seconds. Dividing by 1000 gets rid of the milliseconds
var time = new Date().getTime() / 1000
PHP: Use the time returned from JS, the integer value
$time = gmdate('H:i:s', time)