Log4cxx
  1. Log4cxx
  2. LOGCXX-15

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

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9.7
    • Fix Version/s: 0.10.0
    • Component/s: Layout
    • Labels:
      None
    • Environment:
      redhat linux advanced server 3.0

      Description

      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 .

        Activity

          People

          • Assignee:
            Michaël CATANZARITI
            Reporter:
            hbzhang
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development