From owner-freebsd-java Thu Apr 16 15:36:56 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA00785 for freebsd-java-outgoing; Thu, 16 Apr 1998 15:36:56 -0700 (PDT) (envelope-from owner-freebsd-java@FreeBSD.ORG) Received: from cimlogic.com.au (cimlogic.com.au [203.36.2.25]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA00641 for ; Thu, 16 Apr 1998 22:36:26 GMT (envelope-from jb@cimlogic.com.au) Received: (from jb@localhost) by cimlogic.com.au (8.8.5/8.8.7) id IAA06511 for freebsd-java@freebsd.org; Fri, 17 Apr 1998 08:35:36 +1000 (EST) (envelope-from jb) From: John Birrell Message-Id: <199804162235.IAA06511@cimlogic.com.au> Subject: TimeZones bite To: freebsd-java@FreeBSD.ORG Date: Fri, 17 Apr 1998 08:35:36 +1000 (EST) X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I am getting bitten by Sun's TimeZone code (I've sent a bug report to add to all the other TimeZone bug reports). I am (un)lucky to live in a region which uses EST, but this is Eastern Standard Time in Australia, not the US. Grumble. So instead of getting the default of GMT like a lot of other unknown time zones get, I get a raw offset of -5 hours instead of +10 hours like it should be. My FreeBSD system has /etc/localtime set correctly, so if I do this in C: time_t t = 0; struct tm *tm; tm = localtime(&t); printf("%s Hour %d min %d sec %d\n", tm->tm_zone,tm->tm_hour,tm->tm_min,tm->tm_sec); I get: EST Hour 10 min 0 sec 0 What's the group's attitude to patching TimeZone.java to call a native method to get this right once and for all? I'll have to do this locally to be sure that my application runs properly. Do we have to wait for Sun to fix bugs like this? -- John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/ CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message