title: log4j UTC datetime configuration
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3634585/log4j-how-to-ensure-timestamps-are-always-in-gmt-using-conversionpattern">Log4J; how to ensure timestamps are always in GMT using ConversionPattern?</a>  </p>
  </blockquote>
  
  
  
  <p>How do i configure the log4j to display the datetime in UTC format.</p>
  
  <p>At the moment i am using the below configuration</p>
  
  <pre><code>&lt;appender name="trap-appender" class="org.apache.log4j.DailyRollingFileAppender"&gt;
      &lt;param name="file" value="logs/exception/ExceptionLog.log" /&gt;
      &lt;param name="append" value="true" /&gt;
      &lt;param name="encoding" value="UTF-8" /&gt;
      &lt;layout class="org.apache.log4j.PatternLayout"&gt;
           &lt;param name="ConversionPattern" value="%d{yyyy-MM-dd/HH:mm:ss.SSS}:%m%n" /&gt;
      &lt;/layout&gt;
  &lt;/appender&gt;
  </code></pre>