Re: Date/Time warning [message #177751 is a reply to message #177746] |
Fri, 20 April 2012 07:59 |
alvaro.NOSPAMTHANX
Messages: 277 Registered: September 2010
Karma:
|
Senior Member |
|
|
El 20/04/2012 8:44, Torsten Jørgensen escribió/wrote:
> I get a warning about timezones when using date(). Is there something
> new in PHP, I've
> just migrated from one mac to another.
I wouldn't say it's new (it's been around for several years). You've
carefully ignored the error message but it contains a complete
explanation of what you must do, something like this:
Warning: date() [http://es.php.net/function.date]: 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
'Europe/Paris' for '2.0/DST' instead
Always read error messages: they are there to help, not to annoy, and
they normally contain useful info.
P.S. You can find the path for your "php.ini" file with this script:
<?php
phpinfo();
--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
|
|
|