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

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -