Java Timezone and Ghost Patching

I recently discovered an issue with Java apps using the wrong time zone after applying glibc patches.  Apparently Java uses the sym link for /etc/localtime to determine the timezone then compares this with it’s internal TZ database.

The glibc patch overwrites the sym link with a binary file containing timezone data, which works perfectly fine except for Java.  Removing the file and re-adding the sym link to the appropriate TZ files resolves issue.  Alternatively you could add “-Duser.timezone=US/Eastern”, or whatever the correct timezone is, to the JAVA_OPTS line in your start up scripts.

The bug is documented here: