I am using the following function to get the Time using javascript:
function timeMil(){
var date = new Date();
var timeMil = date.getTime();
return timeMil;
}
And the value I get is:
1352162391299
While in PHP, I use the time();
function to get Time and the value I get is
1352162391
How do I convert the value of javascript time to remove the last 3 digits and make it 10 digits only.
From 1352162391299
To 1352162391
So that the Javascript time is the same with the PHP time.