Issue Details (XML | Word | Printable)

Key: LOGCXX-15
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Michaël CATANZARITI
Reporter: hbzhang
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Log4cxx

PatternLayout don't use locale time zone,it's use GMT tome zone

Created: 09/Sep/04 07:15 AM   Updated: 13/Nov/04 02:55 AM
Return to search
Component/s: Layout
Affects Version/s: 0.9.7
Fix Version/s: 0.10.0

Time Tracking:
Not Specified

Environment: redhat linux advanced server 3.0

Resolution Date: 13/Nov/04 02:55 AM


 Description  « Hide
PatternLayout don't use locale time zone,it's use GMT tome zone to layout.
the following is my log4j.xml :

<!-- A time/date based rolling appender -->
  <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="/home/smsc/site/logs/pnote_db.log"/>
    <param name="Append" value="true"/>
    <param name="MaxFileSize" value="500KB"/>
    <param name="MaxBackupIndex" value="7"/>
    <param name="Threshold" value="DEBUG"/>

    <layout class="org.apache.log4j.PatternLayout">
      <!-- The default pattern: Date Priority [Category] Message\n -->
      <param name="ConversionPattern" value="%d{%Y-%m-%d %Z%H:%M:%S} %-5p [%c:%L] %m%n"/>

    </layout>
  </appender>


for example: this time my system is showing time at Thu Sep 9 15:04:12 HKT 2004,but log4cxx print time is 2004-09-09 GMT06:04:12.

How can I show locale time in log4cxx?
I think it would be show locale time zone .

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Curt Arnold added a comment - 13/Nov/04 02:55 AM
I did an ad-hoc test with the specified format string and the new time rework does appear to fix the problem.