-
Bug
-
Resolution: Fixed
-
P3
-
7
-
b134
-
x86
-
linux
-
Not verified
----------------------------------------------------
public String getDisplayName(boolean daylight,
int style,
Locale locale)
Returns a name of this time zone suitable for presentation to the user in the specified locale. If the display name is not available for the locale, then this method returns a string in the normalized custom ID format.
Parameters:
daylight - if true, return the daylight savings name.
style - either LONG or SHORT
locale - the locale in which to supply the display name.
Returns:
the human-readable name of this time zone in the given locale.
Throws:
IllegalArgumentException - style is invalid.
----------------------------------------------------
From this description it is not clear what will be returned if:
* true is passed as first argument to this method
* useDaylightTime() returns true for this TimeZone instance
As far as I see from 6300580 this method shall not take into account value of useDaylightTime() and return DST display name.
However this decision should be reflected in javadocs.
public String getDisplayName(boolean daylight,
int style,
Locale locale)
Returns a name of this time zone suitable for presentation to the user in the specified locale. If the display name is not available for the locale, then this method returns a string in the normalized custom ID format.
Parameters:
daylight - if true, return the daylight savings name.
style - either LONG or SHORT
locale - the locale in which to supply the display name.
Returns:
the human-readable name of this time zone in the given locale.
Throws:
IllegalArgumentException - style is invalid.
----------------------------------------------------
From this description it is not clear what will be returned if:
* true is passed as first argument to this method
* useDaylightTime() returns true for this TimeZone instance
As far as I see from 6300580 this method shall not take into account value of useDaylightTime() and return DST display name.
However this decision should be reflected in javadocs.
- relates to
-
JDK-6300580 (tz) TimeZone.getDisplayName should not take useDaylightTime() value into account
- Resolved
-
JDK-6638110 (tz) TimeZone.getDisplayName(...) spec is inconsistent with implementation for unavailable locales
- Closed