6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
Reviewed-by: okutsu
This commit is contained in:
parent
343439d82f
commit
be422eef48
@ -1372,7 +1372,7 @@ public class SimpleTimeZone extends TimeZone {
|
||||
throw new IllegalArgumentException(
|
||||
"Illegal start month " + startMonth);
|
||||
}
|
||||
if (startTime < 0 || startTime >= millisPerDay) {
|
||||
if (startTime < 0 || startTime > millisPerDay) {
|
||||
throw new IllegalArgumentException(
|
||||
"Illegal start time " + startTime);
|
||||
}
|
||||
@ -1419,7 +1419,7 @@ public class SimpleTimeZone extends TimeZone {
|
||||
throw new IllegalArgumentException(
|
||||
"Illegal end month " + endMonth);
|
||||
}
|
||||
if (endTime < 0 || endTime >= millisPerDay) {
|
||||
if (endTime < 0 || endTime > millisPerDay) {
|
||||
throw new IllegalArgumentException(
|
||||
"Illegal end time " + endTime);
|
||||
}
|
||||
|
45
jdk/test/java/util/TimeZone/ListTimeZones.java
Normal file
45
jdk/test/java/util/TimeZone/ListTimeZones.java
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Sun designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Sun in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 6851214
|
||||
* @summary Allow 24:00 as a valid end/start DST time stamp
|
||||
* @run main ListTimeZones
|
||||
*/
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class ListTimeZones{
|
||||
public static void main(String[] args){
|
||||
Date date = new Date();
|
||||
String TimeZoneIds[] = TimeZone.getAvailableIDs();
|
||||
for(int i = 0; i < TimeZoneIds.length; i++){
|
||||
TimeZone tz = TimeZone.getTimeZone(TimeZoneIds[i]);
|
||||
Calendar calendar = new GregorianCalendar(tz);
|
||||
String calString = calendar.toString();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user