From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15213 invoked by alias); 26 Aug 2004 20:34:33 -0000 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org Received: (qmail 15187 invoked by alias); 26 Aug 2004 20:34:32 -0000 Date: Thu, 26 Aug 2004 20:34:00 -0000 Message-ID: <20040826203432.15186.qmail@sourceware.org> From: "mark at klomp dot org" To: java-prs@gcc.gnu.org In-Reply-To: <20040812133905.17002.mark@gcc.gnu.org> References: <20040812133905.17002.mark@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug libgcj/17002] java.util.TimeZone.getDefault() is broken X-Bugzilla-Reason: CC X-SW-Source: 2004-q3/txt/msg00339.txt.bz2 List-Id: ------- Additional Comments From mark at klomp dot org 2004-08-26 20:34 ------- Subject: Re: java.util.TimeZone.getDefault() is broken Hi, On Thu, 2004-08-26 at 21:43, mckinlay at redhat dot com wrote: > ------- Additional Comments From mckinlay at redhat dot com 2004-08-26 19:43 ------- > Unfortunately, this isn't yet fixed for some platforms, such as Fedora Core 2. > > FC2 does not set the TZ environment variable, and it does not have an > /etc/timezone file. Even so, if the system property user.timezone isn't set, the TZ environment variable isn't set, there isn't a /etc/timezone, and not /etc/localtime then we still have the libc/posix way of getting the time zone information. > Here's the test case: > > import java.util.TimeZone; > > public class TZ2 > { > public static void main(String[] args) > { > TimeZone tz = TimeZone.getDefault(); > System.out.println (tz.getID()); > } > } > > $ java TZ2 > America/Toronto > > $ gij TZ2 > EST Isn't EST correct for Toronto? You only print the ID not the whole timezone information. Please check all information of the given timezone and see if any of that information is incorrect for you system. Maybe you think that the ID should be different but I think this is not covered by this bug. Please see the TimeZone meta bug for an overview of other issues with TimeZone [Bug libgcj/16990]. Thanks, Mark -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17002