On Sat, 5 Mar 2011 20:42:07 +1300, simon@xxxxxxxxxxx (Simon J Welsh) wrote: >On 5/03/2011, at 8:29 PM, clancy_1@xxxxxxxxxxxx wrote: > >> After a long battle to get my system back on air after a hard disk crash, I got PHP 5.3.5 >> running under Apache 2.2.3. I now get a diagnostic every time I call date(), complaining >> about a missing parameter. The manual states that the second parameter is optional, and >> even phpinfo doesn't know about this new requirement, as it contains the same diagnostic: >> >> "Warning: phpinfo(): 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 'Australia/Melbourne' for >> '11.0/DST' instead in D:\Websites\index.php on line 1 Warning: phpinfo(): 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 'Australia/Melbourne' for '11.0/DST' instead in >> D:\Websites\index.php on line 1 ". >> >> Is this a bug, or a new requirement we will have to get used to? >> >> >> >> Roger Riordan AM > >It's not complaining about a missing parameter, it's complaining about the lack of a specified timezone. > >This warning was introduced in PHP5.1, and you either need to set the date.timezone INI setting, either in your php.ini or by using ini_set(), or by passing a valid timezone to date_default_timezone_set() before calling any other date-related functions. >--- >Simon Welsh >Admin of http://simon.geek.nz/ > >Who said Microsoft never created a bug-free program? The blue screen never, ever crashes! > >http://www.thinkgeek.com/brain/gimme.cgi?wid=81d520e5e Thanks for this. I have put date_default_timezone_set() at the start of my program, which clears up all my bugs, but leaves the bug in PHP.ini. This doesn't worry me. And now I know where my son found the "10 types of people" T-shirt. Unfortunately I seldom wear T-shirts, and my friends wouldn't get the joke anyway. With my best wishes, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php