From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12985 invoked by alias); 23 Feb 2007 15:50:48 -0000 Received: (qmail 12961 invoked by alias); 23 Feb 2007 15:50:48 -0000 Date: Fri, 23 Feb 2007 15:50:00 -0000 Message-ID: <20070223155048.12959.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libgcj/17002] java.util.TimeZone.getDefault() is broken In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: java-prs@gcc.gnu.org From: "cvs-commit at developer dot classpath dot org" Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org X-SW-Source: 2007-q1/txt/msg00373.txt.bz2 ------- Comment #8 from cvs-commit at developer dot classpath dot org 2007-02-23 15:50 ------- Subject: Bug 17002 CVSROOT: /cvsroot/classpath Module name: classpath Changes by: Gary Benson 07/02/23 15:50:04 Modified files: . : ChangeLog NEWS java/lang : System.java java/util : Date.java SimpleTimeZone.java TimeZone.java vm/reference/java/util: VMTimeZone.java Added files: gnu/java/util : ZoneInfo.java Log message: 2007-02-23 Gary Benson Jakub Jelinek PR libgcj/17002 PR classpath/28550 * java/util/Date.java (parse): Properly parse 09:01:02 as hours/minutes/seconds, not as hours/minutes/year. * java/util/SimpleTimeZone.java (SimpleTimeZone): Simplify {start,end}TimeMode constructor by calling shorter constructor, set {start,end}TimeMode fields after it returns. (setStartRule): Don't adjust startTime into WALL_TIME. Set startTimeMode to WALL_TIME. (endStartRule): Similarly. (getOffset): Handle properly millis + dstOffset overflowing into the next day. Adjust startTime resp. endTime based on startTimeMode resp. endTimeMode. * java/util/TimeZone.java (zoneinfo_dir, availableIDs, aliases0): New static fields. (timezones): Remove synchronized keyword. Set zoneinfo_dir. If non-null, set up aliases0 and don't put anything into timezones0. (defaultZone): Call getTimeZone instead of timezones().get. (getDefaultTimeZone): Fix parsing of EST5 or EST5EDT6. Use getTimeZoneInternal instead of timezones().get. (parseTime): Parse correctly hour:minute. (getTimeZoneInternal): New private method. (getTimeZone): Do the custom ID checking first, canonicalize ID for custom IDs as required by documentation. Call getTimeZoneInternal to handle the rest. (getAvailableIDs(int)): Add locking. Handle zoneinfo_dir != null. (getAvailableIDs(File,String,ArrayList)): New private method. (getAvailableIDs()): Add locking. Handle zoneinfo_dir != null. * vm/reference/java/util/VMTimeZone.java (getDefaultTimeZoneId): To read /etc/localtime, use ZoneInfo.readTZFile instead of VMTimeZone.readtzFile. Get better timezone name for /etc/localtime, either if it is a symlink or through /etc/sysconfig/clock. (readSysconfigClockFile): New static method. (readtzFile): Removed. * gnu/java/util/ZoneInfo.java: New file. * java/lang/System.java: Add gnu.java.util.zoneinfo.dir to comments. * NEWS: Documented TimeZone interface changes. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.9128&r2=1.9129 http://cvs.savannah.gnu.org/viewcvs/classpath/NEWS?cvsroot=classpath&r1=1.177&r2=1.178 http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/util/ZoneInfo.java?cvsroot=classpath&rev=1.1 http://cvs.savannah.gnu.org/viewcvs/classpath/java/lang/System.java?cvsroot=classpath&r1=1.59&r2=1.60 http://cvs.savannah.gnu.org/viewcvs/classpath/java/util/Date.java?cvsroot=classpath&r1=1.25&r2=1.26 http://cvs.savannah.gnu.org/viewcvs/classpath/java/util/SimpleTimeZone.java?cvsroot=classpath&r1=1.31&r2=1.32 http://cvs.savannah.gnu.org/viewcvs/classpath/java/util/TimeZone.java?cvsroot=classpath&r1=1.36&r2=1.37 http://cvs.savannah.gnu.org/viewcvs/classpath/vm/reference/java/util/VMTimeZone.java?cvsroot=classpath&r1=1.4&r2=1.5 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17002