Fixed known PHP errors on stats pages.

Fixed time zone bug with the new PHP version.
Fixed a variable bug with ratings in stats.

Note: You'll need to update config.php with the timezone setting.