I'm writing a PHP/JavaScript automation tool. In that tool, it's important to save the time which time was run, so we can use it to create a Google Finance style of stock chart, which allows us to follow the performance pattern of those tests.
The data coming in is basic: date, a DateTime and average, the average time for each test.
id Date Average
351 2013-04-22 15:57:49 154.3
347 2013-04-22 13:58:54 157
344 2013-04-22 12:00:06 444.7
340 2013-04-22 10:01:30 445.3
333 2013-04-22 08:02:24 263
The data come in as a JSON, after being queried from the MySQL database. However, the API I'm using requires data as:
[
[1145836800000,440.50],
[1145923200000,427.16],
[1146009600000,425.97],
[1146096000000,420.03],
[1146182400000,417.94]
]
I'm using HighStock to produce such charts. How can I convert the Datetime strings to milliseconds in JavaScript?
* I'm using PHP in the backend.

PHPin the backend