Warning: date() [function.date]: It is not safe to rely on the system's timezone sett

TheStig
На сайте с 13.02.2010
Offline
98
469
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 'Europe/Helsinki' for 'EEST/3.0/DST' instead in /var/home/***/index.php on line 6

Я так понял, нужно исправить настройки временной зоны в "новом формате". Как это сделать?

http://nl3.php.net/manual/en/timezones.europe.php


<?php
session_start();
include"core/settings.php";
include"core/dbc.php";
$nday=date("Y");
$nday=mktime(0,0,0,date("m"), date("d"),date("Y"));
mysql_query("delete from stat_day where day!='".$nday."'");
$clip=$_SERVER['REMOTE_ADDR'];
$result=mysql_query("select day from stat where day='".$nday."'");
$rows=mysql_num_rows($result);
if ($rows==0) mysql_query("insert into stat values ('".$nday."', '0', '0')");
$result=mysql_query("select * from stat where day='".$nday."'");

TheStig добавил 21.07.2011 в 16:50

Проблему решил. Буржунет немного помог.

Нужно в setttings.php (function.php) прописать вручную настройки

date_default_timezone_set('Europe/Moscow');

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий