i need to convert a date with this format (2017-06-14T08:22:29.296-03:00) to Y-m-d H:i:s. I take that date from an xml response from a soap service, And i need to check if the expiration date is less than the actual date.
I have this and works OK on localhost, but when is uploaded to other server, i have validation problems:
if($wsaa->get_expiration() < date("Y-m-d h:m:i")) {
if ($wsaa->generar_TA()) {
echo '<br>Nuevo Ticket de Acceso Generado';
} else {
echo '<br>No se pudo obtener ticket de acceso';
}
} else {
echo '<br>TA expira:' . $wsaa->get_expiration();
}
$wsaa->get_expiration() return 2017-06-14T08:22:29.296-03:00
I tried to format the date but return with a few minutes of diff.