Page 1 of 1

Strict Standards: date() error

Posted: Tue Aug 12, 2008 3:20 am
by someberry
Hello, I am a bit confused with this one. The error is:

Code: Select all

Strict Standards: 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. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead
However, I am setting the timezone using the putenv() function using the TZ environment.

Code: Select all

putenv("TZ=Belfast/Europe");
Is this perhaps not the right way? Oh, and I want to set it dynamically for each user for a forum.

Thanks :-)

Re: Strict Standards: date() error

Posted: Tue Aug 12, 2008 5:34 am
by EverLearning
It should be "Europe/Belfast" not "Belfast/Europe". Also try using PHP date_default_timezone_set() function, or php.ini date.timezone setting, like the warning message said.

Re: Strict Standards: date() error

Posted: Tue Aug 12, 2008 6:55 am
by someberry
Thanks. Changing it to "Europe/Belfast" worked.