ICU-23157 Don't use gmtZeroFormat
diff --git a/icu4c/source/i18n/tzfmt.cpp b/icu4c/source/i18n/tzfmt.cpp index 0fb6336..aaec9f3 100644 --- a/icu4c/source/i18n/tzfmt.cpp +++ b/icu4c/source/i18n/tzfmt.cpp
@@ -1559,11 +1559,6 @@ TimeZoneFormat::formatOffsetLocalizedGMT(int32_t offset, UBool isShort, UnicodeS return result; } - if (offset == 0) { - result.setTo(fGMTZeroFormat); - return result; - } - UBool positive = true; if (offset < 0) { offset = -offset;
diff --git a/icu4j/main/core/src/main/java/com/ibm/icu/text/TimeZoneFormat.java b/icu4j/main/core/src/main/java/com/ibm/icu/text/TimeZoneFormat.java index cc51ac4..c93c4ef 100644 --- a/icu4j/main/core/src/main/java/com/ibm/icu/text/TimeZoneFormat.java +++ b/icu4j/main/core/src/main/java/com/ibm/icu/text/TimeZoneFormat.java
@@ -798,7 +798,6 @@ public final String formatOffsetISO8601Extended(int offset, boolean useUtcIndica * <li>GMT format pattern (e.g. "GMT {0}" - see {@link #getGMTPattern()}) * <li>Offset time pattern (e.g. "+HH:mm" - see {@link #getGMTOffsetPattern(GMTOffsetPatternType)}) * <li>Offset digits (e.g. "0123456789" - see {@link #getGMTOffsetDigits()}) - * <li>GMT zero format (e.g. "GMT" - see {@link #getGMTZeroFormat()}) * </ul> * This format always uses 2 digit hours and minutes. When the given offset has non-zero * seconds, 2 digit seconds field will be appended. For example, @@ -821,7 +820,6 @@ public String formatOffsetLocalizedGMT(int offset) { * <li>GMT format pattern (e.g. "GMT {0}" - see {@link #getGMTPattern()}) * <li>Offset time pattern (e.g. "+HH:mm" - see {@link #getGMTOffsetPattern(GMTOffsetPatternType)}) * <li>Offset digits (e.g. "0123456789" - see {@link #getGMTOffsetDigits()}) - * <li>GMT zero format (e.g. "GMT" - see {@link #getGMTZeroFormat()}) * </ul> * This format uses the shortest representation of offset. The hours field does not * have leading zero and lower fields with zero will be truncated. For example, @@ -1634,10 +1632,6 @@ public Object parseObject(String source, ParsePosition pos) { * @return the localized GMT string */ private String formatOffsetLocalizedGMT(int offset, boolean isShort) { - if (offset == 0) { - return _gmtZeroFormat; - } - StringBuilder buf = new StringBuilder(); boolean positive = true; if (offset < 0) {