Date: Tue, 11 Nov 2003 22:23:49 -0700 From: Greg Lewis <glewis@eyesbeyond.com> To: Jonathan Chen <jonc@chen.org.nz> Cc: freebsd-java@FreeBSD.org Subject: Re: TimeZone defaults. Message-ID: <20031112052349.GB3528@misty.eyesbeyond.com> In-Reply-To: <20031112025726.GA75356@grimoire.chen.org.nz> References: <20031112025726.GA75356@grimoire.chen.org.nz>
next in thread | previous in thread | raw e-mail | index | archive | help
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@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031112052349.GB3528>