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:
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.