You don't need it in that long format, that is what is just the format that is output when you try to print a Javascript Date object.
You need to create a Javascript Date object
The native way to do that is like so:
var date = new Date([year], [month], [day]);
Note: the month is zero indexed. i.e. January is 0, February is 1, December is 11.
So if you were spitting this out using php.
$date = new DateTime('2011-03-29 00:01:03');
printf('var date = new Date(%d, %d, %d);',
$date->format('Y'),
$date->format('n') - 1,
$date->format('j'),
$date->format('H'),
$date->format('i'),
$date->format('s')
);
Alternatively you could pass it using json:
json_encode(array(
'year' => $date->format('Y'),
'month' => $date->format('n') - 1,
'day' => $date->format('j')
'hour' => $date->format('H'),
'minute' => $date->format('i'),
'second' => $date->format('s')
));
then create the Date with Javascript:
var date = new Date(json.year, json.month, json.day,
json.hour, json.minute, json.second);