/** * Returns the system's installed time zone IDs. Any of these IDs can be * passed to {@link #getTimeZone} to lookup the corresponding time zone * instance. */ public static synchronized String[] getAvailableIDs() { return ZoneInfoDB.getInstance().getAvailableIDs(); }
/** * Returns the IDs of the time zones whose offset from UTC is {@code * offsetMillis}. Any of these IDs can be passed to {@link #getTimeZone} to * lookup the corresponding time zone instance. * * @return a possibly-empty array. */ public static synchronized String[] getAvailableIDs(int offsetMillis) { return ZoneInfoDB.getInstance().getAvailableIDs(offsetMillis); }
/** * Returns an array containing the time zone ids in use in the country corresponding to * the given locale. This is not necessary for Java API, but is used by telephony as a * fallback. We retrieve these strings from zone.tab rather than icu4c because the latter * supplies them in alphabetical order where zone.tab has them in a kind of "importance" * order (as defined in the zone.tab header). */ public static String[] forLocale(Locale locale) { String countryCode = locale.getCountry(); ArrayList<String> ids = new ArrayList<String>(); for (String line : ZoneInfoDB.getInstance().getZoneTab().split("\n")) { if (line.startsWith(countryCode)) { int olsonIdStart = line.indexOf('\t', 4) + 1; int olsonIdEnd = line.indexOf('\t', olsonIdStart); if (olsonIdEnd == -1) { olsonIdEnd = line.length(); // Not all zone.tab lines have a comment. } ids.add(line.substring(olsonIdStart, olsonIdEnd)); } } return ids.toArray(new String[ids.size()]); }
zoneName = ZoneInfoDB.getInstance().getDefaultID();
zone = ZoneInfoDB.getInstance().makeTimeZone(id); } catch (IOException ignored) {
/** * Returns the IDs of the time zones whose offset from UTC is {@code * offsetMillis}. Any of these IDs can be passed to {@link #getTimeZone} to * lookup the corresponding time zone instance. * * @return a possibly-empty array. */ public static synchronized String[] getAvailableIDs(int offsetMillis) { return ZoneInfoDB.getInstance().getAvailableIDs(offsetMillis); }
/** * Returns the system's installed time zone IDs. Any of these IDs can be * passed to {@link #getTimeZone} to lookup the corresponding time zone * instance. */ public static synchronized String[] getAvailableIDs() { return ZoneInfoDB.getInstance().getAvailableIDs(); }
/** * Returns the IDs of the time zones whose offset from UTC is {@code * offsetMillis}. Any of these IDs can be passed to {@link #getTimeZone} to * lookup the corresponding time zone instance. * * @return a possibly-empty array. */ public static synchronized String[] getAvailableIDs(int offsetMillis) { return ZoneInfoDB.getInstance().getAvailableIDs(offsetMillis); }
/** * Returns the IDs of the time zones whose offset from UTC is {@code * offsetMillis}. Any of these IDs can be passed to {@link #getTimeZone} to * lookup the corresponding time zone instance. * * @return a possibly-empty array. */ public static synchronized String[] getAvailableIDs(int offsetMillis) { return ZoneInfoDB.getInstance().getAvailableIDs(offsetMillis); }
/** * Returns the system's installed time zone IDs. Any of these IDs can be * passed to {@link #getTimeZone} to lookup the corresponding time zone * instance. */ public static synchronized String[] getAvailableIDs() { return ZoneInfoDB.getInstance().getAvailableIDs(); }
/** * Returns the system's installed time zone IDs. Any of these IDs can be * passed to {@link #getTimeZone} to lookup the corresponding time zone * instance. */ public static synchronized String[] getAvailableIDs() { return ZoneInfoDB.getInstance().getAvailableIDs(); }
/** * Returns the system's installed time zone IDs. Any of these IDs can be * passed to {@link #getTimeZone} to lookup the corresponding time zone * instance. */ public static synchronized String[] getAvailableIDs() { return ZoneInfoDB.getInstance().getAvailableIDs(); }
/** * Returns the IDs of the time zones whose offset from UTC is {@code * offsetMillis}. Any of these IDs can be passed to {@link #getTimeZone} to * lookup the corresponding time zone instance. * * @return a possibly-empty array. */ public static synchronized String[] getAvailableIDs(int offsetMillis) { return ZoneInfoDB.getInstance().getAvailableIDs(offsetMillis); }
/** * Returns the system's installed time zone IDs. Any of these IDs can be * passed to {@link #getTimeZone} to lookup the corresponding time zone * instance. */ public static synchronized String[] getAvailableIDs() { return ZoneInfoDB.getInstance().getAvailableIDs(); }
/** * Returns the system's installed time zone IDs. Any of these IDs can be * passed to {@link #getTimeZone} to lookup the corresponding time zone * instance. */ public static synchronized String[] getAvailableIDs() { return ZoneInfoDB.getInstance().getAvailableIDs(); }
/** * Returns the IDs of the time zones whose offset from UTC is {@code * offsetMillis}. Any of these IDs can be passed to {@link #getTimeZone} to * lookup the corresponding time zone instance. * * @return a possibly-empty array. */ public static synchronized String[] getAvailableIDs(int offsetMillis) { return ZoneInfoDB.getInstance().getAvailableIDs(offsetMillis); }
/** * Returns the IDs of the time zones whose offset from UTC is {@code * offsetMillis}. Any of these IDs can be passed to {@link #getTimeZone} to * lookup the corresponding time zone instance. * * @return a possibly-empty array. */ public static synchronized String[] getAvailableIDs(int offsetMillis) { return ZoneInfoDB.getInstance().getAvailableIDs(offsetMillis); }
/** * Returns an array containing the time zone ids in use in the country corresponding to * the given locale. This is not necessary for Java API, but is used by telephony as a * fallback. We retrieve these strings from zone.tab rather than icu4c because the latter * supplies them in alphabetical order where zone.tab has them in a kind of "importance" * order (as defined in the zone.tab header). */ public static String[] forLocale(Locale locale) { String countryCode = locale.getCountry(); ArrayList<String> ids = new ArrayList<String>(); for (String line : ZoneInfoDB.getInstance().getZoneTab().split("\n")) { if (line.startsWith(countryCode)) { int olsonIdStart = line.indexOf('\t', 4) + 1; int olsonIdEnd = line.indexOf('\t', olsonIdStart); if (olsonIdEnd == -1) { olsonIdEnd = line.length(); // Not all zone.tab lines have a comment. } ids.add(line.substring(olsonIdStart, olsonIdEnd)); } } return ids.toArray(new String[ids.size()]); }
/** * Returns an array containing the time zone ids in use in the country corresponding to * the given locale. This is not necessary for Java API, but is used by telephony as a * fallback. We retrieve these strings from zone.tab rather than icu4c because the latter * supplies them in alphabetical order where zone.tab has them in a kind of "importance" * order (as defined in the zone.tab header). */ public static String[] forLocale(Locale locale) { String countryCode = locale.getCountry(); ArrayList<String> ids = new ArrayList<String>(); for (String line : ZoneInfoDB.getInstance().getZoneTab().split("\n")) { if (line.startsWith(countryCode)) { int olsonIdStart = line.indexOf('\t', 4) + 1; int olsonIdEnd = line.indexOf('\t', olsonIdStart); if (olsonIdEnd == -1) { olsonIdEnd = line.length(); // Not all zone.tab lines have a comment. } ids.add(line.substring(olsonIdStart, olsonIdEnd)); } } return ids.toArray(new String[ids.size()]); }
/** * Returns an array containing the time zone ids in use in the country corresponding to * the given locale. This is not necessary for Java API, but is used by telephony as a * fallback. We retrieve these strings from zone.tab rather than icu4c because the latter * supplies them in alphabetical order where zone.tab has them in a kind of "importance" * order (as defined in the zone.tab header). */ public static String[] forLocale(Locale locale) { String countryCode = locale.getCountry(); ArrayList<String> ids = new ArrayList<String>(); for (String line : ZoneInfoDB.getInstance().getZoneTab().split("\n")) { if (line.startsWith(countryCode)) { int olsonIdStart = line.indexOf('\t', 4) + 1; int olsonIdEnd = line.indexOf('\t', olsonIdStart); if (olsonIdEnd == -1) { olsonIdEnd = line.length(); // Not all zone.tab lines have a comment. } ids.add(line.substring(olsonIdStart, olsonIdEnd)); } } return ids.toArray(new String[ids.size()]); }