Ver Mensaje Individual
  #3 (permalink)  
Antiguo 05/01/2015, 16:16
MrGilbertMan
 
Fecha de Ingreso: enero-2015
Ubicación: Cordoba, Andalucía
Mensajes: 111
Antigüedad: 9 años, 4 meses
Puntos: 15
Respuesta: Generar fechas incrementando una hora.

No se muy bien que pretendes pero he hecho esto:

$fecha_inicio='2015-01-01 10:00';
$fecha_final='2015-01-02 11:00';

$tiempo_1 = new DateTime($fecha_inicio);
$tiempo_2 = new DateTime($fecha_final);
$resta = $tiempo_1->diff($tiempo_2);
$formato= $resta->format('%d %h:%i:%s');
if ($formato != '0 0:00:00'){
$nueva_fecha= date("d H:i:s", strtotime("$fecha_inicio +1 hours"));
echo $nueva_fecha;}