Ver Mensaje Individual
  #8 (permalink)  
Antiguo 09/02/2010, 18:14
Avatar de angel1993
angel1993
 
Fecha de Ingreso: octubre-2009
Mensajes: 752
Antigüedad: 14 años, 7 meses
Puntos: 22
Respuesta: Registro cada 3 horas

he encontrado esto..
http://www.php.net/manual/en/datetim...fromformat.php
Código PHP:
Ver original
  1. date_default_timezone_set('Europe/Madrid');
  2. $fecha = getdate();
  3. $hora = ($fecha["year"]."-". $fecha["mon"]."-". $fecha["mday"]." - ". $fecha["hours"].":".$fecha["minutes"].":".$fecha["seconds"]);
  4. $format = 'Ym-!d H:i:s' ;
  5. $dt =DateTime::createFromFormat($format,$hora);
  6. echo $dt;
pero me da error el php :S