0

OK, I've managed to install php and get it to run, but I use date(); in several scripts. First I got the error with the not set timezone, I've set the timezone like this:

date.timezone = “Europe/Berlin”</p>

now I get this error: PHP Warning: date(): in blabla on line 13

no error message at all, why do I get this? It's really hard to google because of the other errors, also date, php and warning aren't the bes keywords. Here is my google search:

php Warning: date(): -"It is not safe to rely on" -"expects parameter"

It would be great if someone had a solution for the error or a suggestion for a google search.

Thanks for your help.

Edit: the script works on Xampp on the same machine

Edit 2: So this is the actual line:

$uhrzeit = date("d.m.Y - H:i:s",$timestamp);

and here is the $timestamp set: $timestamp = time();

4

2 回答 2

1

date_default_timezone_set(“欧洲/柏林”);

于 2013-08-14T07:34:01.563 回答
0

你需要使用 date_default_timezone_set('Europe/Berlin'); 将此保留在您的页面中,该页面每次都像配置文件一样运行。

于 2013-08-14T07:37:06.287 回答