Sun Java on RedHat and time zones

less than 1 minute read

For future reference, when updating the time zone on a RedHat machine running Sun’s Java it is not sufficient to update /etc/localtime, you also have to update /etc/sysconfig/clock.

I was under the impression that configuration files within /etc/sysconfig were only supposed to be used for RedHat’s own purposes, but apparently Sun’s Java for Linux looks first at /etc/sysconfig/clock for the time zone, and only if that’s missing it goes to /etc/localtime.

Perhaps this will save you hours of troubleshooting and googling why the fsck your Java apps aren’t using the time zone you have set in /etc/localtime. Argh.