Warning: mktime() [function.mktime]: 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/London' for 'BST/1.0/DST' instead in /Users/graemespence/Sites/smf116/smf_1-1-16_install/install.php on line 1581
Thats new :P
And related to timezones, 2.0 uses two different (and incompatible) ways to set the timezone during install and from the admin panel...that should be fixed too...at some point. :P
Lovely :P
Want a new bug open?
Also 1.1.16 set the time right anyway (maybe a fluke since I live on GMT time anyway), however we could just suppress that error no? (Since its not critical its perfectly right).
Quote from: Trekkie101 on August 22, 2012, 05:00:42 AM
Lovely :P
Yep! One of the many! :P
Quote from: Trekkie101 on August 22, 2012, 05:00:42 AM
Want a new bug open?
I have already one in my 4th bug tracker (my email box :P)
Quote from: Trekkie101 on August 22, 2012, 05:00:42 AM
Also 1.1.16 set the time right anyway (maybe a fluke since I live on GMT time anyway), however we could just suppress that error no? (Since its not critical its perfectly right).
Dunno...
Actually, do we even really support 1.1.16? :o
Don't think for that kind of things...
The original message appears because your server has been updated to PHP 5.3. The best way out is to set your system time offset to 0 and either
- put date.timezone = 'Europe/London' in php.ini, or
- go into phpMyAdmin and in smf_settings, default_timezone set to 'Europe/London'
I suspect that SMF 2.0 would have the same problem on your system.
According to the code it doesn't check my systems time.
It checks the time from the start of Unix Time in 1970, then works out the current Etc/GMT time which according to php.net is a valid time and then manually calculates the offset rather than trusting my system.
Edit: I'm set to Etc/GMT anyway :S
According to http://us3.php.net/manual/en/timezones.others.php, you should use 'UTC' instead of 'Etc/GMT' (which is deprecated, but should still work for now). I take it you don't want to observe BST (Summer Time)?
Possibly because you're using a deprecated timezone is why you're getting the warning about your default_timezone setting.
That could be it, odd though, I'm using stock PHP that comes with OS X.
Does OS X come with a server, or is that a separate package you installed? It sounds like whichever way you got PHP, it's PHP 5.3, which throws warning messages to the screen for use of deprecated features. It might be ignoring your Etc/GMT (no apparent effect if your server time is already GMT) and giving the message. Try changing to UTC to see if it makes any difference.
Nah PHP is built in, as is Apache, only had to install MySQL.
I'll play about with it, cheers MrPhil :)
However for the installer, we should probably still suppress errors like that, since they really don't have much effect on a default install and look bad for new users.
SMF cannot really suppress these errors, as they are generated by PHP. I suppose you can use a very big hammer and block large swaths of error messages, but I think that's asking for trouble. All you need to do is select the correct timezone during installation, from a list provided in PHP 5.2 and up. SMF used to (and may still try to) automatically figure out the timezone as Etc/GMT+n, but that never worked well (no DST/Summer Time) and those timezones are deprecated anyway.
In PHP 5.1 it doesn't have an error.
In PHP 5.3 it seems to fail on my Mac, on my cPanel install at SolarVPS, and I now think any install that was updated instead of installed fresh, so basically most PHP installs for a while.
Also its very simple to suppress just that one line.
mktime() to @mktime()
However upon more testing 2.1 is unaffected using latest git :) so fixed :P