문제

I'm a new user of log4php and I have a problem with the time. The time logged in the log file is late of 2 hours compared with the real time. My configuration file contains:

< layout class="LoggerLayoutPattern"> < param name="conversionPattern" value="%-5level %date{Y-m-d H:i:s,u} %logger %msg%n" /> < /layout>

My configuration:

  • apache-log4php-2.3.0
  • WampServer 2.4 -x64
  • windows 7 64 bits

How can I get the correct time ? Thanks for any advice :)

도움이 되었습니까?

해결책

Have you set a timezone in your php script?

You can set it like:

date_default_timezone_set('Europe/Amsterdam');

Or you can set it on the server in the php.ini or .htaccess files as shown in the following article. How to set a timezone on your PHP server.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top