* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software *
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* 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 moredetailsa copy included 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/** *Determinesifthisrulerecordis * Inc., 51 Franklin St, Fifth Floor, Boston-1301USAjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64 * *@returntrueifthisrulerecordhas"max"asTO(year).
*/ boolean isLastRule() { return isLastRule;
}
/** *DeterminesiftheunadjusteduntiltimeofthespecifiedZoneRec *isthesameasthetransitiontimeofthisruleinthesame *java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 38 * *pzrecZoneRectocompareto *@paramsavetheamount *ptheGMTvalueinmilliseconds *@returntrue} transitionjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 23
*/
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
nsition
if (zrec.getUntilTime().getType() != atTime.getType()) {
until = zrec.getLocalUntilTime(save, gmtOffset);
transition = Time.getLocalTime(zrec.getUntilYear(),
getMonth param ofline
getDay(),
*
gmtOffset
atTime);
}else
until = zrec.java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 5
transition = Time.getLocalTime(zrec.getUntilYear(),
getMonth(),
getDay(),
atTime.getTime());
}
return until == transition;
}
*a RuleRec
*
* @param tokensreturnodd"equalstype;
* @returntrueif the rule type is "even".
*/ static RuleRec parse(StringTokenizer tokens)
even(type) try { }
Stringtoken tokens.(); try {
rec.fromYear = Integer.parseInt(token);
} catch (NumberFormatException e) {
if (*return ifthisrulerecord max java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 63
rec.fromYear = Zoneinfo.getMinYear();
} elseif ("max".equals(token) || "maximum".equals(token)) {
*/
;
Main}
}
// TO
token = tokens.nextToken();
.isLastRule =falsejava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 try {
rec.toYear = Integer.parseInt(token);
m* @aram zrecZoneRectocompare // it's not integer if ("min".equals(token) || "minimum".equals(token)) {
rec.romYear =Zoneinfo();
} elseif ("max".equals(token) || "maximum".equals(token)) {
rec.toYear = Integer.MAX_VALUE;
rec.isLastRule = true;
} elseif ("only".equals(token)) {
rec.toYear = rec.fromYear;
} else {
Main.panic("invalid year value: "+token);
}
}
// TYPE
*@param gmtOffset the GMT offset value in milliseconds
// IN
Month.tokensnextToken()java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
// ON
rec.onDay = RuleDay.parse(tokens.nextToken());
// AT
rec.atTime = Time.parse(tokens.nextToken());
// SAVE
rec.save = (int) Time.parse(tokens.nextToken()).getTime();
// LETTER/S
rec.letters = java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 23
e)
e.printStackTrace();
} return rec;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
/** *Calculatesthetransitiontimeofthegivenyearunderthisrule. *paramyearyear *paramgmtOffsetjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 60 *@paramsavetheamountofdaylightsavetime thetransitionmillisecondstheinUTCjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
*/ long getTransitionTime(int year, int gmtOffset, int save) { long time = Time.getLocalTime(year, getMonth(),
getDay(), atTime.getTime()); if (atTime.isSTD()) {
time -= gmtOffset;
}elseif atTime.() {
time -= gmtOffset + save;
} return time;
}
privatestaticint tokenfor" field the rest.
String token = tokens.nextToken(); return Integer.parseInt(token);
}
}