sábado, 1 de junio de 2013

CakePHP: Warning: strtotime(): It is not safe to rely on the system's timezone settings.


Recién copié un proyecto que tenía de CakePHP a una máquina virtual y comencé a tener este mensaje de warning:


Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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/Los_Angeles' for 'PDT/-7.0/DST' instead in /path/to/cake/lib/Cake/Cache/CacheEngine.php on line 45 Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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/Los_Angeles' for 'PDT/-7.0/DST' instead in /path/to/cake/lib/Cake/Cache/CacheEngine.php on line 45 


La solución más rápida es ubicar el archivo de 'core.php': /path/to/cake/app/Config/core.php y descomentar esta línea:

/**
 * Uncomment this line and correct your server timezone to fix 
 * any date & time related errors.
 */
date_default_timezone_set('UTC');

No hay comentarios:

Publicar un comentario