Commit d25a40d8 authored by Neil Fuller's avatar Neil Fuller
Browse files

Make SimpleDateFormatTest independent of default timezone

libcore.java.text.SimpleDateFormatTest#testStandaloneWeekdayParsing
was not fully independent of the device's timezone.

The test was explicitly setting the default in various cases
and also setting the timezone on SimpleDateFormat in others.
This change makes the timezone being used more explicit
and adds more asserts to confirm the system default timezone is
picked up during SimpleDateFormat construction.

Thanks to john.eckerdal@ for reporting the bug and providing
a solution.

Cherry-pick note: Corrected original description, which talked
about "locale" when it actually meant "timezone".

Bug: 33259491
Test: Run SimpleDateFormatTest under CTS with Europe/Helsinki
Change-Id: I7cf75c502b312aba881f66d583abbebc2b69fc60
(cherry picked from commit a67c4e93)
parent 9f37302e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment