I need to do with php a time check, one that shows me an error message if the time of the computer is less than the server that shows an alert message, so far with much help I got bring the 2 dates but, the values of the 2 as such are not remotely close
hagp the test and the time converted to an integer in javascript throws me
1533156284660
and the php time throws me
998122565
index.php
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<script type="text/javascript">
var f=new Date();
var hora=f.getTime();
$.post("hora.php",{hora:hora},function(d){alert(d)});
</script>
hora.php
<?php
//configuro la zona horario de mi server
date_default_timezone_set('America/Manaus');
//tomo la hora del servidor
$hora = strtotime(date('d-m-y h:i:s'));
// esto es un if corto y comparo el post que mande de index con la hora del servidor
$hora == $_POST['hora'] ? $res = "Es igual" : $res = "No es igual";
echo $_POST["hora"]." - ".$hora;
?>