mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #08032
[Bug 922057] Re: Wth php 5.3 starts to have a lot of warnings It is not safe to rely on the system's time in apache logs
** Changed in: mahara
Status: New => Triaged
** Changed in: mahara
Importance: Undecided => Medium
** Changed in: mahara
Milestone: None => 1.5.0
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/922057
Title:
Wth php 5.3 starts to have a lot of warnings It is not safe to rely
on the system's time in apache logs
Status in Mahara ePortfolio:
Triaged
Bug description:
mahara 1.5 dev master
php version :
PHP 5.3.3 (cli) (built: Nov 3 2011 12:00:26)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
With php set in full error reporting mode , my apache errors logs get
filled with warnings about 'It is not safe to rely on the system's
timezone settings'
[Mon Jan 23 14:51:49 2012] [error] [client 134.214.152.108] [WAR] 6a (lib/mahara.php:2884) 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 'Europe/Berlin' for 'CET/1,0/no DST' instead, referer: http://xxxxxxxxxxxxxxxx/mahara/user/find.php?limit=99
...
[Thu Jan 26 13:24:05 2012] [error] [client 134.214.152.108] * log_message("date(): It is not safe to rely on the system's tim...", 8, true, true, "/var/www/html/mahara.git/htdocs/lib/mahara.php", 2884) at /var/www/html/mahara.git/htdocs/lib/errors.php:446, referer: http://xxxxxxxx/mahara/
[Thu Jan 26 13:24:05 2012] [error] [client 134.214.152.108] * error(2, "date(): It is not safe to rely on the system's tim...", "/var/www/html/mahara.git/htdocs/lib/mahara.php", 2884, array(size 2)) at Unknown:0, referer: http://xxxxxxx/mahara/
[Thu Jan 26 13:24:05 2012] [error] [client 134.214.152.108] * date("Y-m-d h:i:s") at /var/www/html/mahara.git/htdocs/lib/mahara.php:2884, referer: http://xxxxxxx/mahara/
[Thu Jan 26 13:24:05 2012] [error] [client 134.214.152.108] * mahara_log("views", "6") at /var/www/html/mahara.git/htdocs/user/view.php:289, referer: http://xxxxxxxxx/mahara/
I did fixed it by adding at the end of config.php
// quick fix on my place
//date_default_timezone_set("Europe/Berlin");
//a better fix
if(function_exists("date_default_timezone_set") and function_exists("date_default_timezone_get")) {
@date_default_timezone_set(@date_default_timezone_get());
}
But I guess it might be time to add to Mahara's site configuration a
setting about 'server timezone' and use it 'a la Moodle'
Cheers.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/922057/+subscriptions
References