Recently I use the syslog-ng for log collection environment encountered a time zone problem,hope somebody can help me.Thanks<br>The environment is like this:<br>The apache server(PDT timezone,UTC-8) forword apache log through syslog to the syslog-ng server£¨CST timezone£¬UTC£«8£©.<br>
The server with same time zones no problem between the forward.<br>Syslog-ng test configuration is as follows:<br>destination int_apache (file ( &quot;/ disk3/cookie_logs/pid1 / $ YEAR-$ MONTH-$ DAY / $ (HOST). apache.log&quot; time_zone (-08:00) template ( &quot;$ DAY-$ HOUR $ S_DAY-$ S_HOUR $ R_DAY-$ R_HOUR $ $ ISODATE $ MSGONLY \ n &quot;) template_escape (no)););<br>
<br>The original apache log is: <br>58.240.69.161 - - - [14/Jan/2009: 22:27:47 -0800] &quot;GET / <a href="http://www.example.com/">www.example.com/</a> HTTP/1.1&quot; 200 2028 &quot;-&quot; &quot;Mozilla/4.0 ( compatible; MSIE 7.0; Windows NT 5.1) &quot;<br>
<br>The syslog-ng server generated log is:<br>14-22 14-22 14-22 2009-01-14T22 :27:47-08: 00 58.240.69.161 - - - [14/Jan/2009: 22:27:47 -0800] &quot;GET / www.example. com / HTTP/1.1 &quot;200 2028&quot; - &quot;&quot; Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1) &quot;<br>
<br>Originally generated documents should be kept in<br>/disk3/cookie_logs/pid1/2009-01-14<br>However, the actual file is stored in the<br>/disk3/cookie_logs/pid1/2009-01-15<br>It can be seen, in fact, syslog-ng configuration item file() use the $DAY and template()&nbsp; use the $DAY not with a identical Macros. Is this the syslog-ng a bug? or I configuration errors. Who can help me answer you?Thanks!<br>
<br>