equal
deleted
inserted
replaced
542 * @return a {@code ZoneId} representing the same time zone as this |
542 * @return a {@code ZoneId} representing the same time zone as this |
543 * {@code TimeZone} |
543 * {@code TimeZone} |
544 * @since 1.8 |
544 * @since 1.8 |
545 */ |
545 */ |
546 public ZoneId toZoneId() { |
546 public ZoneId toZoneId() { |
547 return ZoneId.of(getID(), ZoneId.SHORT_IDS); |
547 String id = getID(); |
|
548 if (ZoneInfoFile.useOldMapping() && id.length() == 3) { |
|
549 if ("EST".equals(id)) |
|
550 return ZoneId.of("America/New_York"); |
|
551 if ("MST".equals(id)) |
|
552 return ZoneId.of("America/Denver"); |
|
553 if ("HST".equals(id)) |
|
554 return ZoneId.of("America/Honolulu"); |
|
555 } |
|
556 return ZoneId.of(id, ZoneId.SHORT_IDS); |
548 } |
557 } |
549 |
558 |
550 private static TimeZone getTimeZone(String ID, boolean fallback) { |
559 private static TimeZone getTimeZone(String ID, boolean fallback) { |
551 TimeZone tz = ZoneInfo.getTimeZone(ID); |
560 TimeZone tz = ZoneInfo.getTimeZone(ID); |
552 if (tz == null) { |
561 if (tz == null) { |