WN

WN (https://www.wn.se/forum/index.php)
-   Klientsidans teknologier, design och grafik (https://www.wn.se/forum/forumdisplay.php?f=12)
-   -   Tidszon problem -->Warning: date() [function.date]: (https://www.wn.se/forum/showthread.php?t=1046863)

Lancelot 2011-03-01 21:32

Tidszon problem -->Warning: date() [function.date]:
 
Hejsan.

Jag får detta meddelande:

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/Berlin' for 'CET/1.0/no DST' instead in /home/www/dinsida/pj-prisfil.php on line 165


Detta finns på line 165:

$now_date_time = mktime(date("G"),date("i"),date("s"),date("n"),dat e("j"),date("Y"));


Hur ändrar jag det så det blir rätt?

qson 2011-03-01 21:39

Ställ in rätt tidszon i php.ini

date.timezone = Europe/Stockholm
eller
date.timezone = UTC

Du kan också använda php-funktionen date_default_timezone_set för att ställa in samma sak om du inte har tillgång till php.ini


Alla tider är GMT +2. Klockan är nu 23:46.

Programvara från: vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Svensk översättning av: Anders Pettersson