From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7264 invoked by alias); 26 Aug 2004 19:43:41 -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 7230 invoked by uid 48); 26 Aug 2004 19:43:40 -0000 Date: Thu, 26 Aug 2004 19:43:00 -0000 Message-ID: <20040826194340.7229.qmail@sourceware.org> From: "mckinlay at redhat dot com" 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/msg00337.txt.bz2 List-Id: ------- 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. 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 I straced Sun's JVM to see if I could tell how it was getting the timezone ID: open("/etc/sysconfig/clock", O_RDONLY) = 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=42, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xea75d000 read(4, "ZONE=\"America/Toronto\"\nUTC=true\n"..., 4096) = 42 close(4) = 0 Looks like we need to try the /etc/sysconfig/clock file also? -- What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17002