3909N/A * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * Zoneinfo provides javazic compiler front-end functionality. 0N/A * True if javazic should generate a list of SimpleTimeZone 0N/A * instances for the SimpleTimeZone-based time zone support. 0N/A * Zone name to Zone mappings 0N/A * Rule name to Rule mappings 0N/A * Alias name to real name mappings 0N/A * Constracts a Zoneinfo. 0N/A * Adds the given zone to the list of Zones. 0N/A * @param zone Zone to be added to the list. 0N/A * Adds the given rule to the list of Rules. 0N/A * @param rule Rule to be added to the list. 0N/A * Puts the specifid name pair to the alias table. 0N/A * @param name1 an alias time zone name 0N/A * @param name2 the real time zone of the alias name 0N/A * Sets the given year for SimpleTimeZone list output. 0N/A * This method is called when the -S option is specified. 0N/A * @param year the year for which SimpleTimeZone list should be generated 0N/A * Sets the start year. 0N/A * @param year the start year value 0N/A * @throws IllegalArgumentException if the specified year value is 0N/A * smaller than the minimum year or greater than the end year. 0N/A * @return the start year value 0N/A * Sets the end year. 0N/A * @param year the end year value 0N/A * @throws IllegalArgumentException if the specified year value is 0N/A * smaller than the start year or greater than the maximum year. 0N/A * @return the end year value 0N/A * @return the minimum year value 0N/A * @return the maximum year value 0N/A * @return the alias table 0N/A * @return the Zone list 0N/A * @return a Zone specified by name. 0N/A * @param name a zone name 0N/A * @return a Rule specified by name. 0N/A * @param name a rule name 0N/A * Parses the specified time zone data file and creates a Zoneinfo 0N/A * that has all Rules, Zones and Links (aliases) information. 0N/A * @param fname the time zone data file name 0N/A * @return a Zoneinfo object 0N/A // skip blank and comment lines 0N/A // trim trailing comments 0N/A // take the data part of the line 0N/A panic(
"syntax error: zone no more token");
0N/A // if the zone name is in "GMT+hh" or "GMT-hh" 0N/A // format, ignore it due to spec conflict. 0N/A // no way to push the current token back... 0N/A // zone.resolve(zi); 0N/A panic(
"syntax error: rule no more token");
0N/A // Link <newname> <oldname> 0N/A // if the zone name is in "GMT+hh" or "GMT-hh" 0N/A // format, ignore it due to spec conflict with 0N/A // custom time zones. Also, ignore "ROC" for 0N/A panic(
"syntax error: no more token for Link");
0N/A * Interprets a zone and constructs a Timezone object that 0N/A * contains enough information on GMT offsets and DST schedules to 0N/A * generate a zone info database. 0N/A * @param zoneName the zone name for which a Timezone object is 0N/A * @return a Timezone object that contains all GMT offsets and DST 0N/A * rules information. 0N/A // TODO: merge phase2's for the regular and SimpleTimeZone ones. 0N/A * This part assumes that the specified year is covered by 0N/A * the rules referred to by the last zone record. 0N/A // make sure that one is a start rule and the other is 0N/A // take the index 0 for the GMT offset of the last zone record 0N/A // If this is the last zone record, take the last rule info. 0N/A // in case the last rule is all year round DST-only 0N/A // optimization in case the last rule is fixed. 0N/A // See if until time in the previous 0N/A // ZoneRec is the same thing as the 0N/A // local time in the next rule. 0N/A // Assume that this Zone stopped DST