php - How to compare mysql timestamp with jquery timestamp? -
i have timestamp value return mysql table. need compare jquery timestamp check whether time , date expired or not.
from stackoverflow answer get: difference between jquery timestamp , php timestamp?
timestamps in jquery (as returned $.now, defers date.prototype.gettime) javascript expressed in milliseconds. in php, (using time et al) in seconds.
so, can write like:
$time_php = strtotime(2015-08-29 00:00:00); $time_js = 13898736000 * 1000; if($time_php > $time_js) { echo"php time greater"; } else{ echo"js time greater";}
Comments
Post a Comment