I have changed the Linux system date to Sat Jun 30 23:50:00 2012. After changing the date I am running a simple java program to log the system date. The problem is: Java is logging 25 seconds ahead of Linux system time. For example: Java log: 2012-07-01 00:02:15 INFO Scheduler:19 - Sun Jul 01 00:02:15 GMT 2012 Linux time: Sun Jul 1 00:01:50 GMT 2012 Both are GMT!
I am doing this to analyze the leap second issue. I checked total no of leap second in /etc/localtime it is 25. zdump -v /etc/localtime | grep 59:60 | wc -l 25
I rebooted the system and also restarted the ntp server but still there is 25 second difference!
I am using SUSE Linux Enterprise Server 11 SP3 (x86_64) and JAVA 1.7
Please help me out to understand what is wrong? And how to fix this?
You need to update your timezone data in JRE:
tzupdater
from http://www.oracle.com/technetwork/java/javase/downloads/tzupdater-download-513681.htmlNew leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49
java -jar tzupdater.jar