Jump to content

Need help with Warning: date() [function.date]: in blocked.php


Function

Recommended Posts

I'm getting this Time Zone error.

Perhaps it's a compatibility issue with PHP 5.3. Looked all over for an answer without finding one.

Here is the error message

 

 

Warning: date() [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 'America/New_York' for 'EST/-5.0/no DST'

instead in /blocked.php on line 41

12/02/12

 

Here is the code. Line 41 is near the bottom, the one with the d,m,y.  Perhaps the echo date (d/m/y") needs to be changed. Appreciate any help!

 

   <table border="3" width="16%" align="center" cellspacing="0" bgcolor="#FF6600" bordercolor="red" bordercolordark="red" bordercolorlight="red">
                            <tr>
                                    <td width="176">

                                            <p align="center"><?php // shows IP Number on Page
            echo $ip; ?> </p>

                                    </td>
                            </tr>
                    </table>
                    <p align="center"><?php // Show the user agent
        echo 'Your user agent is: <b>'.$_SERVER['HTTP_USER_AGENT'].'</b><br />';?></p>
                    [b]<h1 align="center"><?php echo date("d/m/y");?></h1>[/b]
            </td>
    </tr>
</table
[,code]

Link to comment
Share on other sites

are you including the function call in each file???

 

 

also  as mentioned in the php.ini file needs to be changed to that timezone.

date.timezone="America/Toronto"

 

if you can't access the php.ini make a .htcaccess file and do this....

php_flag date.timezone ="America/Toronto"

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.