Ver Mensaje Individual
  #2 (permalink)  
Antiguo 28/04/2009, 05:21
magicrat
 
Fecha de Ingreso: abril-2009
Mensajes: 13
Antigüedad: 15 años
Puntos: 0
Respuesta: Refresco JS - PHP

Adjunto el código de testUtils.php

//--------------------------------------------------------------------------
// testUtils.php
//--------------------------------------------------------------------------

//<![CDATA[

TEST_UTILS_PHP = {};

TEST_UTILS_PHP.getServerTime = function () {
// Aunque ponga el header de no-cache, no se refresca la fecha
var currentTime = '<?php print date("F d, Y H:i:s", time())?>';
//var currentTime = '<?php header( "Cache-control: no-cache" ); header( "Expire: -1" ); print date("F d, Y H:i:s", time())?>';
var serverTime = new Date(currentTime);
return serverTime;
}

//]]>