author | ohair |
Wed, 06 Apr 2011 22:06:11 -0700 | |
changeset 9035 | 1255eb81cc2f |
parent 7782 | edfd4b1cd078 |
child 10110 | 75674d930b1f |
permissions | -rw-r--r-- |
2 | 1 |
/* |
9035
1255eb81cc2f
7033660: Update copyright year to 2011 on any files changed in 2011
ohair
parents:
7782
diff
changeset
|
2 |
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
package build.tools.javazic; |
|
27 |
||
28 |
import java.io.BufferedReader; |
|
29 |
import java.io.FileReader; |
|
30 |
import java.io.FileNotFoundException; |
|
31 |
import java.io.IOException; |
|
32 |
import java.util.ArrayList; |
|
33 |
import java.util.HashMap; |
|
34 |
import java.util.Iterator; |
|
35 |
import java.util.List; |
|
36 |
import java.util.Map; |
|
37 |
import java.util.StringTokenizer; |
|
38 |
||
39 |
/** |
|
40 |
* Zoneinfo provides javazic compiler front-end functionality. |
|
41 |
* @since 1.4 |
|
42 |
*/ |
|
43 |
class Zoneinfo { |
|
44 |
||
45 |
private static final int minYear = 1900; |
|
46 |
private static final int maxYear = 2037; |
|
47 |
private static final long minTime = Time.getLocalTime(minYear, Month.JANUARY, 1, 0); |
|
48 |
private static int startYear = minYear; |
|
49 |
private static int endYear = maxYear; |
|
50 |
||
51 |
/** |
|
52 |
* True if javazic should generate a list of SimpleTimeZone |
|
53 |
* instances for the SimpleTimeZone-based time zone support. |
|
54 |
*/ |
|
55 |
static boolean isYearForTimeZoneDataSpecified = false; |
|
56 |
||
57 |
/** |
|
58 |
* Zone name to Zone mappings |
|
59 |
*/ |
|
60 |
private Map<String,Zone> zones; |
|
61 |
||
62 |
/** |
|
63 |
* Rule name to Rule mappings |
|
64 |
*/ |
|
65 |
private Map<String,Rule> rules; |
|
66 |
||
67 |
/** |
|
68 |
* Alias name to real name mappings |
|
69 |
*/ |
|
70 |
private Map<String,String> aliases; |
|
71 |
||
72 |
/** |
|
73 |
* Constracts a Zoneinfo. |
|
74 |
*/ |
|
75 |
Zoneinfo() { |
|
76 |
zones = new HashMap<String,Zone>(); |
|
77 |
rules = new HashMap<String,Rule>(); |
|
78 |
aliases = new HashMap<String,String>(); |
|
79 |
} |
|
80 |
||
81 |
/** |
|
82 |
* Adds the given zone to the list of Zones. |
|
83 |
* @param zone Zone to be added to the list. |
|
84 |
*/ |
|
85 |
void add(Zone zone) { |
|
86 |
String name = zone.getName(); |
|
87 |
zones.put(name, zone); |
|
88 |
} |
|
89 |
||
90 |
/** |
|
91 |
* Adds the given rule to the list of Rules. |
|
92 |
* @param rule Rule to be added to the list. |
|
93 |
*/ |
|
94 |
void add(Rule rule) { |
|
95 |
String name = rule.getName(); |
|
96 |
rules.put(name, rule); |
|
97 |
} |
|
98 |
||
99 |
/** |
|
100 |
* Puts the specifid name pair to the alias table. |
|
101 |
* @param name1 an alias time zone name |
|
102 |
* @param name2 the real time zone of the alias name |
|
103 |
*/ |
|
104 |
void putAlias(String name1, String name2) { |
|
105 |
aliases.put(name1, name2); |
|
106 |
} |
|
107 |
||
108 |
/** |
|
109 |
* Sets the given year for SimpleTimeZone list output. |
|
110 |
* This method is called when the -S option is specified. |
|
111 |
* @param year the year for which SimpleTimeZone list should be generated |
|
112 |
*/ |
|
113 |
static void setYear(int year) { |
|
114 |
setStartYear(year); |
|
115 |
setEndYear(year); |
|
116 |
isYearForTimeZoneDataSpecified = true; |
|
117 |
} |
|
118 |
||
119 |
/** |
|
120 |
* Sets the start year. |
|
121 |
* @param year the start year value |
|
122 |
* @throws IllegalArgumentException if the specified year value is |
|
123 |
* smaller than the minimum year or greater than the end year. |
|
124 |
*/ |
|
125 |
static void setStartYear(int year) { |
|
126 |
if (year < minYear || year > endYear) { |
|
127 |
throw new IllegalArgumentException("invalid start year specified: " + year); |
|
128 |
} |
|
129 |
startYear = year; |
|
130 |
} |
|
131 |
||
132 |
/** |
|
133 |
* @return the start year value |
|
134 |
*/ |
|
135 |
static int getStartYear() { |
|
136 |
return startYear; |
|
137 |
} |
|
138 |
||
139 |
/** |
|
140 |
* Sets the end year. |
|
141 |
* @param year the end year value |
|
142 |
* @throws IllegalArgumentException if the specified year value is |
|
143 |
* smaller than the start year or greater than the maximum year. |
|
144 |
*/ |
|
145 |
static void setEndYear(int year) { |
|
146 |
if (year < startYear || year > maxYear) { |
|
147 |
throw new IllegalArgumentException(); |
|
148 |
} |
|
149 |
endYear = year; |
|
150 |
} |
|
151 |
||
152 |
/** |
|
153 |
* @return the end year value |
|
154 |
*/ |
|
155 |
static int getEndYear() { |
|
156 |
return endYear; |
|
157 |
} |
|
158 |
||
159 |
/** |
|
160 |
* @return the minimum year value |
|
161 |
*/ |
|
162 |
static int getMinYear() { |
|
163 |
return minYear; |
|
164 |
} |
|
165 |
||
166 |
/** |
|
167 |
* @return the maximum year value |
|
168 |
*/ |
|
169 |
static int getMaxYear() { |
|
170 |
return maxYear; |
|
171 |
} |
|
172 |
||
173 |
/** |
|
174 |
* @return the alias table |
|
175 |
*/ |
|
176 |
Map<String,String> getAliases() { |
|
177 |
return aliases; |
|
178 |
} |
|
179 |
||
180 |
/** |
|
181 |
* @return the Zone list |
|
182 |
*/ |
|
183 |
Map<String,Zone> getZones() { |
|
184 |
return zones; |
|
185 |
} |
|
186 |
||
187 |
/** |
|
188 |
* @return a Zone specified by name. |
|
189 |
* @param name a zone name |
|
190 |
*/ |
|
191 |
Zone getZone(String name) { |
|
192 |
return zones.get(name); |
|
193 |
} |
|
194 |
||
195 |
/** |
|
196 |
* @return a Rule specified by name. |
|
197 |
* @param name a rule name |
|
198 |
*/ |
|
199 |
Rule getRule(String name) { |
|
200 |
return rules.get(name); |
|
201 |
} |
|
202 |
||
203 |
private static String line; |
|
204 |
||
205 |
private static int lineNum; |
|
206 |
||
207 |
/** |
|
208 |
* Parses the specified time zone data file and creates a Zoneinfo |
|
209 |
* that has all Rules, Zones and Links (aliases) information. |
|
210 |
* @param fname the time zone data file name |
|
211 |
* @return a Zoneinfo object |
|
212 |
*/ |
|
213 |
static Zoneinfo parse(String fname) { |
|
214 |
BufferedReader in = null; |
|
215 |
try { |
|
216 |
FileReader fr = new FileReader(fname); |
|
217 |
in = new BufferedReader(fr); |
|
218 |
} catch (FileNotFoundException e) { |
|
219 |
panic("can't open file: "+fname); |
|
220 |
} |
|
221 |
Zoneinfo zi = new Zoneinfo(); |
|
222 |
boolean continued = false; |
|
223 |
Zone zone = null; |
|
224 |
String l; |
|
7782 | 225 |
lineNum = 0; |
2 | 226 |
|
227 |
try { |
|
228 |
while ((line = in.readLine()) != null) { |
|
229 |
lineNum++; |
|
230 |
// skip blank and comment lines |
|
231 |
if (line.length() == 0 || line.charAt(0) == '#') { |
|
232 |
continue; |
|
233 |
} |
|
234 |
||
235 |
// trim trailing comments |
|
236 |
int rindex = line.lastIndexOf('#'); |
|
237 |
if (rindex != -1) { |
|
238 |
// take the data part of the line |
|
239 |
l = line.substring(0, rindex); |
|
240 |
} else { |
|
241 |
l = line; |
|
242 |
} |
|
243 |
||
244 |
StringTokenizer tokens = new StringTokenizer(l); |
|
245 |
if (!tokens.hasMoreTokens()) { |
|
246 |
continue; |
|
247 |
} |
|
248 |
String token = tokens.nextToken(); |
|
249 |
||
250 |
if (continued || "Zone".equals(token)) { |
|
251 |
if (zone == null) { |
|
252 |
if (!tokens.hasMoreTokens()) { |
|
253 |
panic("syntax error: zone no more token"); |
|
254 |
} |
|
255 |
token = tokens.nextToken(); |
|
256 |
// if the zone name is in "GMT+hh" or "GMT-hh" |
|
257 |
// format, ignore it due to spec conflict. |
|
258 |
if (token.startsWith("GMT+") || token.startsWith("GMT-")) { |
|
259 |
continue; |
|
260 |
} |
|
261 |
zone = new Zone(token); |
|
262 |
} else { |
|
263 |
// no way to push the current token back... |
|
264 |
tokens = new StringTokenizer(l); |
|
265 |
} |
|
266 |
||
267 |
ZoneRec zrec = ZoneRec.parse(tokens); |
|
268 |
zrec.setLine(line); |
|
269 |
zone.add(zrec); |
|
270 |
if ((continued = zrec.hasUntil()) == false) { |
|
271 |
if (Zone.isTargetZone(zone.getName())) { |
|
272 |
// zone.resolve(zi); |
|
273 |
zi.add(zone); |
|
274 |
} |
|
275 |
zone = null; |
|
276 |
} |
|
277 |
} else if ("Rule".equals(token)) { |
|
278 |
if (!tokens.hasMoreTokens()) { |
|
279 |
panic("syntax error: rule no more token"); |
|
280 |
} |
|
281 |
token = tokens.nextToken(); |
|
282 |
Rule rule = zi.getRule(token); |
|
283 |
if (rule == null) { |
|
284 |
rule = new Rule(token); |
|
285 |
zi.add(rule); |
|
286 |
} |
|
287 |
RuleRec rrec = RuleRec.parse(tokens); |
|
288 |
rrec.setLine(line); |
|
289 |
rule.add(rrec); |
|
290 |
} else if ("Link".equals(token)) { |
|
291 |
// Link <newname> <oldname> |
|
292 |
try { |
|
293 |
String name1 = tokens.nextToken(); |
|
294 |
String name2 = tokens.nextToken(); |
|
295 |
||
296 |
// if the zone name is in "GMT+hh" or "GMT-hh" |
|
297 |
// format, ignore it due to spec conflict with |
|
298 |
// custom time zones. Also, ignore "ROC" for |
|
299 |
// PC-ness. |
|
300 |
if (name2.startsWith("GMT+") || name2.startsWith("GMT-") |
|
301 |
|| "ROC".equals(name2)) { |
|
302 |
continue; |
|
303 |
} |
|
304 |
zi.putAlias(name2, name1); |
|
305 |
} catch (Exception e) { |
|
306 |
panic("syntax error: no more token for Link"); |
|
307 |
} |
|
308 |
} |
|
309 |
} |
|
310 |
in.close(); |
|
311 |
} catch (IOException ex) { |
|
312 |
panic("IO error: " + ex.getMessage()); |
|
313 |
} |
|
314 |
||
315 |
return zi; |
|
316 |
} |
|
317 |
||
318 |
/** |
|
319 |
* Interprets a zone and constructs a Timezone object that |
|
320 |
* contains enough information on GMT offsets and DST schedules to |
|
321 |
* generate a zone info database. |
|
322 |
* |
|
323 |
* @param zoneName the zone name for which a Timezone object is |
|
324 |
* constructed. |
|
325 |
* |
|
326 |
* @return a Timezone object that contains all GMT offsets and DST |
|
327 |
* rules information. |
|
328 |
*/ |
|
329 |
Timezone phase2(String zoneName) { |
|
330 |
Timezone tz = new Timezone(zoneName); |
|
331 |
Zone zone = getZone(zoneName); |
|
332 |
zone.resolve(this); |
|
333 |
||
334 |
// TODO: merge phase2's for the regular and SimpleTimeZone ones. |
|
335 |
if (isYearForTimeZoneDataSpecified) { |
|
336 |
ZoneRec zrec = zone.get(zone.size()-1); |
|
337 |
tz.setLastZoneRec(zrec); |
|
338 |
tz.setRawOffset(zrec.getGmtOffset()); |
|
339 |
if (zrec.hasRuleReference()) { |
|
340 |
/* |
|
341 |
* This part assumes that the specified year is covered by |
|
342 |
* the rules referred to by the last zone record. |
|
343 |
*/ |
|
344 |
List<RuleRec> rrecs = zrec.getRuleRef().getRules(startYear); |
|
345 |
||
346 |
if (rrecs.size() == 2) { |
|
347 |
// make sure that one is a start rule and the other is |
|
348 |
// an end rule. |
|
349 |
RuleRec r0 = rrecs.get(0); |
|
350 |
RuleRec r1 = rrecs.get(1); |
|
351 |
if (r0.getSave() == 0 && r1.getSave() > 0) { |
|
352 |
rrecs.set(0, r1); |
|
353 |
rrecs.set(1, r0); |
|
354 |
} else if (!(r0.getSave() > 0 && r1.getSave() == 0)) { |
|
355 |
rrecs = null; |
|
356 |
Main.error(zoneName + ": rules for " + startYear + " not found."); |
|
357 |
} |
|
358 |
} else { |
|
359 |
rrecs = null; |
|
360 |
} |
|
361 |
if (rrecs != null) { |
|
362 |
tz.setLastRules(rrecs); |
|
363 |
} |
|
364 |
} |
|
365 |
return tz; |
|
366 |
} |
|
367 |
||
368 |
int gmtOffset; |
|
369 |
int year = minYear; |
|
370 |
int fromYear = year; |
|
371 |
long fromTime = Time.getLocalTime(startYear, |
|
372 |
Month.JANUARY, |
|
373 |
1, 0); |
|
374 |
||
375 |
// take the index 0 for the GMT offset of the last zone record |
|
376 |
ZoneRec zrec = zone.get(zone.size()-1); |
|
377 |
tz.getOffsetIndex(zrec.getGmtOffset()); |
|
378 |
||
379 |
int currentSave = 0; |
|
380 |
boolean usedZone; |
|
381 |
for (int zindex = 0; zindex < zone.size(); zindex++) { |
|
382 |
zrec = zone.get(zindex); |
|
383 |
usedZone = false; |
|
384 |
gmtOffset = zrec.getGmtOffset(); |
|
385 |
int stdOffset = zrec.getDirectSave(); |
|
386 |
||
387 |
// If this is the last zone record, take the last rule info. |
|
388 |
if (!zrec.hasUntil()) { |
|
389 |
tz.setRawOffset(gmtOffset, fromTime); |
|
390 |
if (zrec.hasRuleReference()) { |
|
391 |
tz.setLastRules(zrec.getRuleRef().getLastRules()); |
|
392 |
} else if (stdOffset != 0) { |
|
393 |
// in case the last rule is all year round DST-only |
|
394 |
// (Asia/Amman once announced this rule.) |
|
395 |
tz.setLastDSTSaving(stdOffset); |
|
396 |
} |
|
397 |
} |
|
398 |
if (!zrec.hasRuleReference()) { |
|
399 |
if (!zrec.hasUntil() || zrec.getUntilTime(stdOffset) >= fromTime) { |
|
400 |
tz.addTransition(fromTime, |
|
401 |
tz.getOffsetIndex(gmtOffset+stdOffset), |
|
402 |
tz.getDstOffsetIndex(stdOffset)); |
|
403 |
usedZone = true; |
|
404 |
} |
|
405 |
currentSave = stdOffset; |
|
406 |
// optimization in case the last rule is fixed. |
|
407 |
if (!zrec.hasUntil()) { |
|
408 |
if (tz.getNTransitions() > 0) { |
|
409 |
if (stdOffset == 0) { |
|
410 |
tz.setDSTType(tz.X_DST); |
|
411 |
} else { |
|
412 |
tz.setDSTType(tz.LAST_DST); |
|
413 |
} |
|
414 |
long time = Time.getLocalTime(maxYear, |
|
415 |
Month.JANUARY, 1, 0); |
|
416 |
time -= zrec.getGmtOffset(); |
|
417 |
tz.addTransition(time, |
|
418 |
tz.getOffsetIndex(gmtOffset+stdOffset), |
|
419 |
tz.getDstOffsetIndex(stdOffset)); |
|
420 |
tz.addUsedRec(zrec); |
|
421 |
} else { |
|
422 |
tz.setDSTType(tz.NO_DST); |
|
423 |
} |
|
424 |
break; |
|
425 |
} |
|
426 |
} else { |
|
427 |
Rule rule = zrec.getRuleRef(); |
|
428 |
boolean fromTimeUsed = false; |
|
429 |
currentSave = 0; |
|
430 |
year_loop: |
|
431 |
for (year = getMinYear(); year <= endYear; year++) { |
|
432 |
if (zrec.hasUntil() && year > zrec.getUntilYear()) { |
|
433 |
break; |
|
434 |
} |
|
435 |
List<RuleRec> rules = rule.getRules(year); |
|
436 |
if (rules.size() > 0) { |
|
437 |
for (int i = 0; i < rules.size(); i++) { |
|
438 |
RuleRec rrec = rules.get(i); |
|
439 |
long transition = rrec.getTransitionTime(year, |
|
440 |
gmtOffset, |
|
441 |
currentSave); |
|
442 |
if (zrec.hasUntil()) { |
|
443 |
if (transition >= zrec.getUntilTime(currentSave)) { |
|
444 |
break year_loop; |
|
445 |
} |
|
446 |
} |
|
447 |
||
448 |
if (fromTimeUsed == false) { |
|
449 |
if (fromTime <= transition) { |
|
450 |
fromTimeUsed = true; |
|
451 |
||
452 |
if (fromTime != minTime) { |
|
453 |
int prevsave; |
|
454 |
||
455 |
ZoneRec prevzrec = zone.get(zindex - 1); |
|
456 |
||
457 |
// See if until time in the previous |
|
458 |
// ZoneRec is the same thing as the |
|
459 |
// local time in the next rule. |
|
460 |
// (examples are Asia/Ashkhabad in 1991, |
|
461 |
// Europe/Riga in 1989) |
|
462 |
||
463 |
if (i > 0) { |
|
464 |
prevsave = rules.get(i-1).getSave(); |
|
465 |
} else { |
|
466 |
List<RuleRec> prevrules = rule.getRules(year-1); |
|
467 |
||
468 |
if (prevrules.size() > 0) { |
|
469 |
prevsave = prevrules.get(prevrules.size()-1).getSave(); |
|
470 |
} else { |
|
471 |
prevsave = 0; |
|
472 |
} |
|
473 |
} |
|
474 |
||
475 |
if (rrec.isSameTransition(prevzrec, prevsave, gmtOffset)) { |
|
476 |
currentSave = rrec.getSave(); |
|
477 |
tz.addTransition(fromTime, |
|
478 |
tz.getOffsetIndex(gmtOffset+currentSave), |
|
479 |
tz.getDstOffsetIndex(currentSave)); |
|
480 |
tz.addUsedRec(rrec); |
|
481 |
usedZone = true; |
|
482 |
continue; |
|
483 |
} |
|
484 |
if (!prevzrec.hasRuleReference() |
|
485 |
|| rule != prevzrec.getRuleRef() |
|
486 |
|| (rule == prevzrec.getRuleRef() |
|
487 |
&& gmtOffset != prevzrec.getGmtOffset())) { |
|
488 |
int save = (fromTime == transition) ? rrec.getSave() : currentSave; |
|
489 |
tz.addTransition(fromTime, |
|
490 |
tz.getOffsetIndex(gmtOffset+save), |
|
491 |
tz.getDstOffsetIndex(save)); |
|
492 |
tz.addUsedRec(rrec); |
|
493 |
usedZone = true; |
|
494 |
} |
|
495 |
} else { |
|
496 |
int save = rrec.getSave(); |
|
497 |
tz.addTransition(fromTime, |
|
498 |
tz.getOffsetIndex(gmtOffset+save), |
|
499 |
tz.getDstOffsetIndex(save)); |
|
500 |
tz.addUsedRec(rrec); |
|
501 |
usedZone = true; |
|
502 |
} |
|
503 |
} else if (year == fromYear && i == rules.size()-1) { |
|
504 |
int save = rrec.getSave(); |
|
505 |
tz.addTransition(fromTime, |
|
506 |
tz.getOffsetIndex(gmtOffset+save), |
|
507 |
tz.getDstOffsetIndex(save)); |
|
508 |
} |
|
509 |
} |
|
510 |
||
511 |
currentSave = rrec.getSave(); |
|
512 |
if (fromTime < transition) { |
|
513 |
tz.addTransition(transition, |
|
514 |
tz.getOffsetIndex(gmtOffset+currentSave), |
|
515 |
tz.getDstOffsetIndex(currentSave)); |
|
516 |
tz.addUsedRec(rrec); |
|
517 |
usedZone = true; |
|
518 |
} |
|
519 |
} |
|
520 |
} else { |
|
521 |
if (year == fromYear) { |
|
522 |
tz.addTransition(fromTime, |
|
523 |
tz.getOffsetIndex(gmtOffset+currentSave), |
|
524 |
tz.getDstOffsetIndex(currentSave)); |
|
525 |
fromTimeUsed = true; |
|
526 |
} |
|
527 |
if (year == endYear && !zrec.hasUntil()) { |
|
528 |
if (tz.getNTransitions() > 0) { |
|
529 |
// Assume that this Zone stopped DST |
|
530 |
tz.setDSTType(tz.X_DST); |
|
531 |
long time = Time.getLocalTime(maxYear, Month.JANUARY, |
|
532 |
1, 0); |
|
533 |
time -= zrec.getGmtOffset(); |
|
534 |
tz.addTransition(time, |
|
535 |
tz.getOffsetIndex(gmtOffset), |
|
536 |
tz.getDstOffsetIndex(0)); |
|
537 |
usedZone = true; |
|
538 |
} else { |
|
539 |
tz.setDSTType(tz.NO_DST); |
|
540 |
} |
|
541 |
} |
|
542 |
} |
|
543 |
} |
|
544 |
} |
|
545 |
if (usedZone) { |
|
546 |
tz.addUsedRec(zrec); |
|
547 |
} |
|
548 |
if (zrec.hasUntil() && zrec.getUntilTime(currentSave) > fromTime) { |
|
549 |
fromTime = zrec.getUntilTime(currentSave); |
|
550 |
fromYear = zrec.getUntilYear(); |
|
551 |
year = zrec.getUntilYear(); |
|
552 |
} |
|
553 |
} |
|
554 |
||
555 |
if (tz.getDSTType() == tz.UNDEF_DST) { |
|
556 |
tz.setDSTType(tz.DST); |
|
557 |
} |
|
558 |
tz.optimize(); |
|
559 |
tz.checksum(); |
|
560 |
return tz; |
|
561 |
} |
|
562 |
||
563 |
private static void panic(String msg) { |
|
564 |
Main.panic(msg); |
|
565 |
} |
|
566 |
} |