8220229: Timezone pattern "OOOO" does not result in the full "GMT+00:00" substring

Reviewed-by: lancea, rriggs
This commit is contained in:
Naoto Sato 2019-06-20 11:21:54 -07:00
parent 4c4bd162c5
commit 8f39def1ec

View File

@ -396,15 +396,16 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* 'Z' when the offset to be output would be zero, whereas pattern letter 'x' * 'Z' when the offset to be output would be zero, whereas pattern letter 'x'
* (lower case) will output '+00', '+0000', or '+00:00'. * (lower case) will output '+00', '+0000', or '+00:00'.
* <p> * <p>
* <b>Offset O</b>: This formats the localized offset based on the number of * <b>Offset O</b>: With a non-zero offset, this formats the localized offset
* pattern letters. One letter outputs the {@linkplain TextStyle#SHORT short} * based on the number of pattern letters. One letter outputs the
* form of the localized offset, which is localized offset text, such as 'GMT', * {@linkplain TextStyle#SHORT short} form of the localized offset, which is
* with hour without leading zero, optional 2-digit minute and second if * localized offset text, such as 'GMT', with hour without leading zero, optional
* non-zero, and colon, for example 'GMT+8'. Four letters outputs the * 2-digit minute and second if non-zero, and colon, for example 'GMT+8'. Four
* {@linkplain TextStyle#FULL full} form, which is localized offset text, * letters outputs the {@linkplain TextStyle#FULL full} form, which is localized
* such as 'GMT, with 2-digit hour and minute field, optional second field * offset text, such as 'GMT, with 2-digit hour and minute field, optional second
* if non-zero, and colon, for example 'GMT+08:00'. Any other count of letters * field if non-zero, and colon, for example 'GMT+08:00'. If the offset is zero,
* throws {@code IllegalArgumentException}. * only localized text is output. Any other count of letters throws
* {@code IllegalArgumentException}.
* <p> * <p>
* <b>Offset Z</b>: This formats the offset based on the number of pattern * <b>Offset Z</b>: This formats the offset based on the number of pattern
* letters. One, two or three letters outputs the hour and minute, without a * letters. One, two or three letters outputs the hour and minute, without a