JDK-8003267 : Support generic time zone names in TimeZoneNameProvider (SPI)
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-11-12
  • Updated: 2017-05-17
  • Resolved: 2012-12-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8 b69Fixed
Related Reports
Relates :  
Relates :  
Description
JSR 310 requires generic time zone names. java.util.spi.TimeZoneNameProvider needs to support generic time zone names. A generic time zone name is standard/daylight saving time independent. For example, "Pacific Time" is a generic name of America/Los_Angeles.
Comments
Additional method to java.util.spi.TimeZoneNameProvider: /** * Returns a generic name for the given time zone {@code ID} that's suitable * for presentation to the user in the specified {@code locale}. Generic * time zone names are neutral from standard time and daylight saving * time. For example, "PT" is the short generic name of time zone ID {@code * America/Los_Angeles}, while its short standard time and daylight saving * time names are "PST" and "PDT", respectively. Refer to * {@link #getDisplayName(String, boolean, int, Locale) getDisplayName} * for valid time zone IDs. * * <p>The default implementation of this method returns {@code null}. * * @param ID a time zone ID string * @param style either {@link java.util.TimeZone#LONG TimeZone.LONG} or * {@link java.util.TimeZone#SHORT TimeZone.SHORT} * @param locale the desired locale * @return the human-readable generic name of the given time zone in the * given locale, or {@code null} if it's not available. * @exception IllegalArgumentException if <code>style</code> is invalid, * or <code>locale</code> isn't one of the locales returned from * {@link LocaleServiceProvider#getAvailableLocales() * getAvailableLocales()}. * @exception NullPointerException if <code>ID</code> or <code>locale</code> * is {@code null} * @since 1.8 */ public String getGenericDisplayName(String ID, int style, Locale locale)
03-12-2012