Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Apr 1998 08:35:36 +1000 (EST)
From:      John Birrell <jb@cimlogic.com.au>
To:        freebsd-java@FreeBSD.ORG
Subject:   TimeZones bite
Message-ID:  <199804162235.IAA06511@cimlogic.com.au>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804162235.IAA06511>