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)
Loading
Please sign in to comment