Java ignoring Daylight Savings Time

David Kramer david-8uUts6sDVDvs2Lz0fTdYFQ at public.gmane.org
Sat May 9 19:03:29 EDT 2009


David Hummel wrote:
> Actually your characterization is not quite correct.  This has been a
> known issue for quite some time:
> 
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6456628

Having a bug report filed on it is not the same thing as being
documented, especially when Sun has an entire page on time zone issues
that doesn't mention either TZ or the symlink issue.

http://java.sun.com/javase/timezones/

> Making /etc/localtime a symlink is a deprecated Redhat-ism that may
> have other undesirable side effects.
> 
> The distribution-independent way to fix this is to set the TZ
> environment variable prior to executing the JVM:
> 
> export TZ=America/New_York
> 
> On Debian and derived distributions, you can do this:
> 
> export TZ=$( cat /etc/timezone )
> 
> On Redhat and derived distributions, setting TZ is unnecessary if the
> ZONE entry in /etc/sysconfig/clock is correct and properly
> double-quoted.

Very useful information.  Thanks.






More information about the Discuss mailing list