0

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

Aaron W.
  • 9,254
  • 2
  • 34
  • 45

1 Answers1

1

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.

Arnold Wiersma
  • 165
  • 1
  • 4
  • 17
  • Thanks for your response :) But actually, I noticed that the apache.log in wamp has the same problem. So I guess that it's a problem with the Wamp configuration. I will take a look at it. – Tiah Le Coco Aug 27 '13 at 15:48