Not logged in. · Lost password · Register
Forum: General Help and Support Server Setup RSS
date warning on every page
Avatar
dxtans #1
Member since Aug 2009 · 11 posts
Group memberships: Members
Show profile · Link to this post
Subject: date warning on every page
Hello,
I'm getting the date warning on every page, after an install:

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function.We had to select 'UTC' because your platform doesn't provide functionality for the guessing algorithm in /opt/apache2/htdocs/dokuwiki-2009-02-14/inc/template.php on line 316

I've edited my php.ini file in /usr/local/lib and changed the timezone to:
[Date]
; Defines the default timezone used by the date functions
date.timezone = Europe/London

restarted apache, but I still get the errors.
Does anybody know how I can fix this please.

thanks
dxtans

aix 5.3
apache 2.2
php 5.2.6
Avatar
dxtans #2
Member since Aug 2009 · 11 posts
Group memberships: Members
Show profile · Link to this post
ok fixed it by putting the line :
date_default_timezone_set("Europe/London");

at the top of the template.php file

dxtans
Avatar
FromageTheDog #3
Member since Aug 2009 · 1 post
Group memberships: Members
Show profile · Link to this post
Same here.  I noticed it following a Snow Leopard install -- looks like Apple updated to PHP 5.3.

I did as dxtans below, and added a date_default_timezone_set(); call in my template.php file.  Valid timezones can be found here:

http://us3.php.net/manual/en/timezones.php
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2020-01-27, 20:09:22 (UTC +01:00)