Remove special UTC handling in SimpleDateFormat
ICU59 introduced support for localized UTC names.
Special-case formating / parsing logic for
UTC can therefore be removed from SimpleDateFormat.
This change removes the explicit UTC logic and
adds some new tests.
In reality the SimpleDateFormat change means that:
1) Formatting "zzzz" will generate a long localized string
(previously it would have produced "UTC").
2) Parsing "zzzz" is unchanged as SimpleDateFormat
was already doing a lookup in ICU if the timezone
string wasn't an exact match for "UTC".
3) "z" formatting and parsing behavior is
unchanged as the short form of UTC offered for
most languages by ICU is "UTC".
There may be compatibility issues for apps
that have come to assume "UTC" is the output
for "zzzz" all languages.
The only one of the new tests that fails under
the old scheme is:
libcore.java.text.SimpleDateFormatTest#testFormatUtcLong
because the test has explicit expecations around
the "zzzz" form of UTC.
Test: CTS: run cts -m CtsLibcoreTestCases
Bug: 36337342
Change-Id: Ia8daa49420af82ed69b00bf8e75e0c8727f6bd1f
2 files changed