public static String getCanonicalCLDRID ( String tzid ) { String canonical = CANONICAL_ID_CACHE . get ( tzid ) ; if ( canonical == null ) { canonical = findCLDRCanonicalID ( tzid ) ; if ( canonical == null ) { // Resolve Olson link and try it again if necessary try { int zoneIdx = getZoneIndex ( tzid ) ; if ( zoneIdx >= 0 ) { UResourceBundle top = UResourceBundle . getBundleInstance ( ICUData . ICU_BASE_NAME , ZONEINFORESNAME , ICUResourceBundle . ICU_DATA_CLASS_LOADER ) ; UResourceBundle zones = top . get ( kZONES ) ; UResourceBundle zone = zones . get ( zoneIdx ) ; if ( zone . getType ( ) == UResourceBundle . INT ) { // It's a link - resolve link and lookup tzid = getZoneID ( zone . getInt ( ) ) ; canonical = findCLDRCanonicalID ( tzid ) ; } if ( canonical == null ) { canonical = tzid ; } } } catch ( MissingResourceException e ) { // fall through } } if ( canonical != null ) { CANONICAL_ID_CACHE . put ( tzid , canonical ) ; } } return canonical ; }
Return the canonical id for this tzid defined by CLDR which might be the id itself . If the given tzid is not known return null .