From owner-freebsd-java Tue Apr 25 15: 7:33 2000 Delivered-To: freebsd-java@freebsd.org Received: from firewall.ox.com (firewall.ox.com [129.77.1.1]) by hub.freebsd.org (Postfix) with ESMTP id EEDA037BE95 for ; Tue, 25 Apr 2000 15:07:21 -0700 (PDT) (envelope-from rcf@ox.com) Received: from firewall.ox.com (root@localhost) by firewall.ox.com with ESMTP id SAA23666 for ; Tue, 25 Apr 2000 18:07:20 -0400 (EDT) Received: from pur-wk-rfurphy.ny.ox.com (pur-wk-rfurphy.ny.ox.com [129.77.2.133]) by firewall.ox.com with ESMTP id SAA23660 for ; Tue, 25 Apr 2000 18:07:20 -0400 (EDT) Received: from ox.com (localhost.ny.ox.com [127.0.0.1]) by pur-wk-rfurphy.ny.ox.com (8.9.3/8.9.3) with ESMTP id SAA25156; Tue, 25 Apr 2000 18:07:19 -0400 (EDT) (envelope-from rcf@ox.com) Message-ID: <39061716.2E69B654@ox.com> Date: Tue, 25 Apr 2000 18:07:19 -0400 From: Rob Furphy X-Mailer: Mozilla 4.7 [en] (X11; I; FreeBSD 3.4-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-java@freebsd.org Cc: glewis@trc.adelaide.edu.au Subject: Pre-alpha JDK 1.2.2 TimeZone (time) bug fixed! Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hello all, I really did some digging and I have solved the problem with the JDK for freebsd not figuring out the correct timezone (and ultimately never having the correct time). This fixes the time but the locale is still not quite correct (I get "America/Santiago" instead of "America/New_York"). At least the time is now correct. Perhaps that can be fixed at a later date. I don't know the formal way to get this into the next patchset but here is the fix: in src/freebsd/native/java/lang/java_props_md.c at line 283 you'll find #ifdef __FreeBSD__ /*** XXX ***/ hasDST = local_tm->tm_isdst; offset = local_tm->tm_gmtoff; #else hasDST = daylight == 0 ? kStandard : kDaylight; offset = timezone / -60; /* Conventions reversed between UNIX & Java */ #endif change this to: #ifdef __FreeBSD__ /*** XXX ***/ hasDST = local_tm->tm_isdst; offset = local_tm->tm_gmtoff / 60; /**** Here's the changed line ****/ #else hasDST = daylight == 0 ? kStandard : kDaylight; offset = timezone / -60; /* Conventions reversed between UNIX & Java */ #endif Rob F To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message