From owner-freebsd-java@FreeBSD.ORG Tue Nov 11 18:57:29 2003 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B36A16A4CE for ; Tue, 11 Nov 2003 18:57:29 -0800 (PST) Received: from chen.org.nz (chen.org.nz [210.54.19.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id 783A743F93 for ; Tue, 11 Nov 2003 18:57:28 -0800 (PST) (envelope-from jonc@chen.org.nz) Received: by chen.org.nz (Postfix, from userid 1000) id 151591362A; Wed, 12 Nov 2003 15:57:27 +1300 (NZDT) Date: Wed, 12 Nov 2003 15:57:26 +1300 From: Jonathan Chen To: freebsd-java@freebsd.org Message-ID: <20031112025726.GA75356@grimoire.chen.org.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: TimeZone defaults. X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2003 02:57:29 -0000 Hi, This topic came up before with no resolution; and it's still present in the latest native JDK1.4.2 port: The default TimeZone is not being set correctly: 0:baldur-/tmp,3:52pm> date Wed Nov 12 15:53:01 NZDT 2003 0:baldur-/tmp,3:53pm> java tztest Greenwich Mean Time 0:baldur-/tmp,3:53pm> java -version java version "1.4.2-p5" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-p5-root_12_nov_2003_10_06) Java HotSpot(TM) Client VM (build 1.4.2-p5-root_12_nov_2003_10_06, mixed mode) Here's the code for tztest.java: import java.util.TimeZone; public class tztest { public static void main ( String args []) { TimeZone tz = TimeZone.getDefault (); System.out.println (tz.getDisplayName ()); } } TimeZone.getTimeZone(String id) *does* work, so there is a workaround, but TimeZone.getDefault() isn't picking the Host-System's TimeZone setting. I'll raise a PR for it if no one here knows of a quick fix. Cheers. -- Jonathan Chen ---------------------------------------------------------------------- "Lots of folks confuse bad management with destiny" - Kin Hubbard