|
#1
|
||||
|
||||
PHP Warning
Hello all,
I have this warning in announce.php, so what is to do. Code:
[Sat May 22 12:55:52.087372 2021] [:error] [pid 19406] [client 86.61.53.162:36312] PHP Warning: strtotime(): 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/admin/web/noviteti.net/public_html/announce.php on line 160 Code:
[Sat May 22 12:55:52.087409 2021] [:error] [pid 19406] [client 86.61.53.162:36312] PHP Warning: 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 line 160 and 161 is: Code:
$dt = strtotime(date('Y-m-d H:i:s')) - 180; $dt = sqlesc(date('Y-m-d H:i:s', $dt)); |
#2
|
|||
|
|||
or easier..in your config.php or bittorrent.php or whatever global file you have just define the default timezone date_default_timezone_set('Europe/London');
__________________
Need HELP!? I can install:
|
#3
|
||||
|
||||
Like this
Code:
$dt = gmdate('Y-m-d H:i:s') - 180; $dt = sqlesc(gmdate("Y-m-d H:i:s")); |
#4
|
|||
|
|||
Quote:
Code:
$sec = 4*86400; // 4 days $dt = sqlesc(get_date_time(gmtime() - $sec)); |
|
|