Clear DateFormat.is24Hour during test.
TCKLocalizedPrinterParser checks if java.time.format.DateTimeFormatter and java.text.DateFormat produce the same output for equivalent input. java.text.DateFormat takes into account DateFormat.is24Hour which represents a user-setting forcing a 12- or 24-hour clock. java.time intentionally doesn't respect that, which causes this test to fail when either a 12h or a 24h clock is forced. This commits clears the setting for the duration of the test and re-sets it to its orginal value afterwards. Test: cts --primary-abi-only -m CtsLibcoreOjTestCases Bug: 62651881 Change-Id: I30bab1d5f04cac8bdfc9a455c8ddc3ff39271077 (cherry picked from commit fd8f0567)
Loading
Please sign in to comment