From owner-freebsd-java@FreeBSD.ORG Mon Apr 11 16:24:57 2005 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 4A4F016A4CE for ; Mon, 11 Apr 2005 16:24:57 +0000 (GMT) Received: from mail.borderware.com (mail.borderware.com [207.236.65.231]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5465B43D46 for ; Mon, 11 Apr 2005 16:24:56 +0000 (GMT) (envelope-from christy@borderware.com) Message-ID: <425AA4DA.8070103@borderware.com> Date: Mon, 11 Apr 2005 12:24:58 -0400 From: Christy Pang User-Agent: Mozilla Thunderbird 0.6 (Macintosh/20040502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-java@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Re: 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: Mon, 11 Apr 2005 16:24:57 -0000 I am using java version "1.4.2-p6" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-p6-root_26_jan_2005_10_29) Java HotSpot(TM) Client VM (build 1.4.2-p6-root_26_jan_2005_10_29, mixed mode) Is there a patch to fix this problem (*TimeZone.getDefault() isn't picking the Host-System's TimeZone setting*)? Thanks Christy On Wed, Nov 12, 2003 at 03:57:26PM +1300, Jonathan Chen wrote: > 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) I looked into this when it was reported earlier, but unfortunately it worked for me (and still does). I'll have to try a few different time zone settings and try and get a feel for which ones break. > date Tue Nov 11 22:22:55 MST 2003 > java tztest Mountain Standard Time > 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. Please put a PR in, its too easy to lose track otherwise. -- Greg Lewis Email : glewis at eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis at FreeBSD.org