This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with Log4j log for Daylight Saving in US  RSS feed

 
Karan Agnihotree
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
One application running in weblogic server in US and is logging the events using the log4j API. But since few days after the Daylight saving started in US, even after changing the date/time settings of the server system , the logs coming are in the old time which is one hour slower than current time. For example : Before Daylight: time 1:00 AM after Daylight saving time: 2:00 AM But here it is continuing to log same time.My Log4j Configurations are

<appender name="STDOUT"
class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{HH:mm:ss}|%t|%p|%c|%x|%m\n"/>
<param name="ConversionPattern" value="%d{HH:mm:ss}|%t|%x|%m\n"/>
</layout>
</appender>


<appender name="ROLLING" class="org.apache.log4j.FileAppender">

<!-- <param name="File" value="d:/UpsShippingProcess/logs/AtpShipping.log"/> -->
<param name="File" value="c:/UpsShippingProcess/logs/AtpShipping.log"/>
<param name="DatePattern" value=".yyyy-MM-dd"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{HH:mm:ss}|%t|%p|%c|%x|%m\n"/>
<!-- <param name="ConversionPattern" value="%d{HH:mm:ss}|%t|%x|%m\n"/>-->
</layout>
</appender>

Please help whether there is anything other which I should code to get this Daylight get reflected.

Thanks

Karan
 
Carol Enderlin
drifter
Ranch Hand
Posts: 1364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you checked your java version and whether it has the timezone updates?

Sun's FAQ Timezones and Java Runtime Environment
 
Karan Agnihotree
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java version is jdk1.4.2 and it has no Timezone updates. What should be done to solve this problem.
 
Karan Agnihotree
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
with a tool called tzupdater tool we can update the jvm with latest timezone updates. Down load the tool from Sun website and read the following .

http://java.sun.com/javase/tzupdater_README.html

This has resolved my issue.

Thanks

Karan
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!