Foros del Web » Programando para Internet » PHP » Symfony »

Error Render Twig DateTime

Estas en el tema de Error Render Twig DateTime en el foro de Symfony en Foros del Web. Hola nuevamente comunidad, me ha salido este error y no se como solucionarlo, casi no he encontrado como hacerlo, alguna idea de solucionarlo Twig_Error_Runtime: "An ...
  #1 (permalink)  
Antiguo 05/12/2013, 10:23
 
Fecha de Ingreso: noviembre-2013
Mensajes: 83
Antigüedad: 10 años, 5 meses
Puntos: 0
Pregunta Error Render Twig DateTime

Hola nuevamente comunidad, me ha salido este error y no se como solucionarlo, casi no he encontrado como hacerlo, alguna idea de solucionarlo

Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("DateTime::__construct(): Failed to parse time string (-001-11-30T00:00:00-06:00) at position 7 (-): Double timezone specification") in
  #2 (permalink)  
Antiguo 05/12/2013, 10:27
 
Fecha de Ingreso: noviembre-2013
Mensajes: 83
Antigüedad: 10 años, 5 meses
Puntos: 0
Respuesta: Error Render Twig DateTime

En la entidad tengo esto

/**
* @var \DateTime
*
* @ORM\Column(name="date_of_interview", type="date", nullable=false)
*/
private $dateOfInterview;




/**
* Set dateOfInterview
*
* @param \DateTime $dateOfInterview
* @return SchoolUseAdmin
*/
public function setDateOfInterview($dateOfInterview)
{
$this->dateOfInterview = $dateOfInterview;

return $this;
}

en la vista twig lo llamo asi

<li><a data-toggle="tab" href="#tab_{{ pp.id }}">{{ var.dateOfInterview|date('Y-m-d H:i:s') }}</a></li>
  #3 (permalink)  
Antiguo 05/12/2013, 19:21
Avatar de hhs
hhs
Colaborador
 
Fecha de Ingreso: junio-2013
Ubicación: México
Mensajes: 2.995
Antigüedad: 10 años, 9 meses
Puntos: 379
Respuesta: Error Render Twig DateTime

Cita:
Iniciado por pmeninsaxmus16 Ver Mensaje
Hola nuevamente comunidad, me ha salido este error y no se como solucionarlo, casi no he encontrado como hacerlo, alguna idea de solucionarlo

Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("DateTime::__construct(): Failed to parse time string (-001-11-30T00:00:00-06:00) at position 7 (-): Double timezone specification") in
Tienes problemas con la zona horaria, revisa la documentación de twig:
http://twig.sensiolabs.org/doc/filters/date.html
__________________
Saludos
About me
Laraveles
A class should have only one reason to change.

Etiquetas: datetime, render
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 16:53.