// Specific format
assert (style == LONG || style == SHORT || style == SHORT_COMMONLY_USED);
// Gets the name directly from TimeZoneNames
long date = System.currentTimeMillis();
TimeZoneNames tznames = TimeZoneNames.getInstance(locale);
NameType nameType = null;
switch (style) {
case LONG:
nameType = daylight ? NameType.LONG_DAYLIGHT : NameType.LONG_STANDARD;
break;
case SHORT:
case SHORT_COMMONLY_USED:
nameType = daylight ? NameType.SHORT_DAYLIGHT : NameType.SHORT_STANDARD;
break;
}
result = tznames.getDisplayName(ZoneMeta.getCanonicalCLDRID(this), nameType, date);
if (result == null) {
// Fallback to localized GMT
TimeZoneFormat tzfmt = TimeZoneFormat.getInstance(locale);
int offset = daylight && useDaylightTime() ? getRawOffset() + getDSTSavings() : getRawOffset();
result = (style == LONG) ? tzfmt.formatOffsetLocalizedGMT(offset) : tzfmt.formatOffsetShortLocalizedGMT(offset);