PHP - Extraer Date en PHP5

 
Vista:

Extraer Date en PHP5

Publicado por Morgan (1 intervención) el 25/06/2014 19:35:19
Buen día

Al intenter probar con date marca un mensaje...



<?php
/*phpinfo();*/
date_default_timezone_set ('America/ Mexico_City');
$dia=date('d');

echo $dia;




WARNING:


Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Denver' for '-6.0/DST' instead in C:\AppServ\www\Proyecto\dia.php on line 4
25


Listo Para resolver agregar America/Denver
<?php
/*phpinfo();*/
date_default_timezone_set ("America/Denver");
$dia=date('d');

echo $dia;
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
1
Responder