Disculpen.. no tenia tiempo para responder.
Aquí modifiqué el código para hacerlo mas fácil de entender.
$fechas_horario = "";
$horario_salida = date("H:i:s", strtotime($fechas_horario));
if ($row[5] == "Edf. Administrativo"){
if (substr($row[2], 0, 10) == substr($fechas_horario, 0, 10)){
$horas_trabajadas = date("H:i:s", strtotime("00:00:00") + strtotime($fechas_horario) - strtotime($row[2]));
echo "Horas en la Corporación: ".$horas_trabajadas . "<br /><br />";
if(strtotime(substr($row[2], 11, 8)) < strtotime("08:30:00")){
$horas_manana = date("H:i:s", strtotime("00:00:00") + strtotime("08:30:00") - strtotime($row[2]));
echo "Ingresó " . $horas_manana . " antes. <br /><br />";
}
$horas_descontado_manana = date("H:i:s", strtotime("00:00:00") + strtotime($horas_trabajadas) - strtotime($horas_manana));
echo "Tiempo real de trabajo: " . $horas_descontado_manana;
$horas_extras_ini = date("H:i:s", strtotime($fechas_horario));
if(strtotime($horas_extras_ini) > strtotime("16:30:00")){
$horas_extras = date("H:i:s", strtotime("00:00:00") + strtotime($fechas_horario) - strtotime("16:30:00"));
echo "<br /><br />Horas extras: " . $horas_extras;
}
if(strtotime($horas_extras_ini) > strtotime("19:00:00") && strtotime($horas_extras_ini) < strtotime("23:00:00")){
$horas_extras_noc = date("H:i:s", strtotime("00:00:00") + strtotime($fechas_horario) - strtotime("19:00:00"));
echo "<br /><br />Horas extras nocturna: " . $horas_extras_noc;
echo "<br />BN = 1";
}
if(strtotime($horas_extras_ini) > strtotime("23:00:01")){
$horas_extras_noc_2 = date("H:i:s", strtotime("00:00:00") + strtotime($fechas_horario) - strtotime("23:00:00"));
echo "<br /><br />Horas extras nocturna: " . $horas_extras_noc_2;
echo "<br />BN = 1";
}
}
if(strtotime(substr($row[2], 0, 10)) == strtotime("-1 days", substr($fechas_horario, 0, 10))){
$horas_extras_diu = date("H:i:s", strtotime("00:00:00") + strtotime($horario_salida) - strtotime("05:00:00"));
echo "<br /><br />Horas extras Diurnas: " . $horas_extras_diu;
echo "<br />BN = 1";
}
}
$fechas_horario = $row[2];
la variable $row[2]; me trae un fomato de fecha de esta manera "27/09/2011 06:44:15" de hecho pueden utilizar ese formato para los que desean probar el ejemplo.
Como mencioné en un principio, esta script me funciona perfectamente en servidores linux, pero en windows no furula.
Muchas gracias.