Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [php] date_default_timezone_set - błąd na stronie
yamaka
post 2.12.2017, 16:15:19
Post #1





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 14.10.2009

Ostrzeżenie: (0%)
-----


Witam

Mam takie ostrzeżenie na stronce:
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 'UTC' for 'UTC/0.0/no DST' instead in /home/

Linijka kodu:
  1. {
  2. $timeformat = "d.m.y H:i:s";
  3. if(EncodeExplorer::getConfig("time_format") != null && strlen(EncodeExplorer::getConfig("time_format")) > 0)
  4. $timeformat = EncodeExplorer::getConfig("time_format");
  5. return date($timeformat, $time);
  6. }


Błąd jest przy return date($timeformat, $time);
Nie jestem specjalistą od php. Nie mam dostępu do plików .ini. Chciałbym dokonać zmiany na poziomie powyższego skryptu php.
Ew w .htaccess

Będę wdzięczny za pomoc.

Pozdrawiam
Kamil
Go to the top of the page
+Quote Post
Tomplus
post 2.12.2017, 16:42:19
Post #2





Grupa: Zarejestrowani
Postów: 1 834
Pomógł: 225
Dołączył: 20.03.2005
Skąd: Będzin

Ostrzeżenie: (0%)
-----




  1. if( ! ini_get('date.timezone') )
  2. {
  3. date_default_timezone_set('GMT');
  4. }
Go to the top of the page
+Quote Post
yamaka
post 2.12.2017, 16:46:59
Post #3





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 14.10.2009

Ostrzeżenie: (0%)
-----


Dziękuję, pomogło.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 20.04.2024 - 00:09