/// <summary> /// Converts this {@code TimeZone} object to a {@code ZoneId}. /// </summary> /// <returns> a {@code ZoneId} representing the same time zone as this /// {@code TimeZone} /// @since 1.8 </returns> public virtual ZoneId ToZoneId() { String id = ID; if (ZoneInfoFile.useOldMapping() && id.Length() == 3) { if ("EST".Equals(id)) { return(ZoneId.Of("America/New_York")); } if ("MST".Equals(id)) { return(ZoneId.Of("America/Denver")); } if ("HST".Equals(id)) { return(ZoneId.Of("America/Honolulu")); } } return(ZoneId.Of(id, ZoneId.SHORT_IDS)); }