mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8234347: "Turkey" meta time zone does not generate composed localized names
8236548: Localized time zone name inconsistency between English and other locales Reviewed-by: joehw, rriggs
This commit is contained in:
parent
2fbbce2b23
commit
5c3a01591c
10 changed files with 177 additions and 254 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -4260,9 +4260,15 @@ public final class DateTimeFormatterBuilder {
|
|||
char nextNextChar = text.charAt(position + 1);
|
||||
if (context.charEquals(nextChar, 'U') && context.charEquals(nextNextChar, 'T')) {
|
||||
if (length >= position + 3 && context.charEquals(text.charAt(position + 2), 'C')) {
|
||||
return parseOffsetBased(context, text, position, position + 3, OffsetIdPrinterParser.INSTANCE_ID_ZERO);
|
||||
// There are localized zone texts that start with "UTC", e.g.
|
||||
// "UTC\u221210:00" (MINUS SIGN instead of HYPHEN-MINUS) in French.
|
||||
// Exclude those ZoneText cases.
|
||||
if (!(this instanceof ZoneTextPrinterParser)) {
|
||||
return parseOffsetBased(context, text, position, position + 3, OffsetIdPrinterParser.INSTANCE_ID_ZERO);
|
||||
}
|
||||
} else {
|
||||
return parseOffsetBased(context, text, position, position + 2, OffsetIdPrinterParser.INSTANCE_ID_ZERO);
|
||||
}
|
||||
return parseOffsetBased(context, text, position, position + 2, OffsetIdPrinterParser.INSTANCE_ID_ZERO);
|
||||
} else if (context.charEquals(nextChar, 'G') && length >= position + 3 &&
|
||||
context.charEquals(nextNextChar, 'M') && context.charEquals(text.charAt(position + 2), 'T')) {
|
||||
if (length >= position + 4 && context.charEquals(text.charAt(position + 3), '0')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue