Date.parse returning wrong result

Hello all,

I may be doing this the wrong way but I been following the documentation to get the amount of seconds since epoch and I am getting the wrong result.

Basically I have a string like this


var myDateString='2013 02 06 13:05:00';

or any other in same format so now I do this


myDateString=Date.parse(myDateString);

Which returns Wed Feb 06 2013 13:05:00 GMT+0100,

Now, this thing I am running inside a jquery function which I am not sure if it is affecting it but I don’t get why in the documentation says it will return the amount of seconds and it is returning a completely different thing.

Hi,

It does return the number of milliseconds.
If I do this:

var myDateString='2013 02 06 13:05:00';
myDateString=Date.parse(myDateString);
console.log(myDateString);

Then I see the output as: 1360152300000

Maybe there is something else in your code that is affecting the result?