Date: Tue, 25 Apr 2000 18:07:19 -0400 From: Rob Furphy <rcf@ox.com> To: freebsd-java@freebsd.org Cc: glewis@trc.adelaide.edu.au Subject: Pre-alpha JDK 1.2.2 TimeZone (time) bug fixed! Message-ID: <39061716.2E69B654@ox.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39061716.2E69B654>