mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8177819: DateTimeFormatterBuilder zone parsing should recognise DST
8277049: ZonedDateTime parse in Fall DST transition fails to retain the correct zonename. Reviewed-by: joehw, scolebourne
This commit is contained in:
parent
9b3e672059
commit
a363b7b921
5 changed files with 121 additions and 130 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2021, 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
|
||||
|
@ -417,6 +417,24 @@ final class DateTimeParseContext {
|
|||
currentParsed().zone = zone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores the parsed zone name type.
|
||||
* <p>
|
||||
* This stores the zone name type that has been parsed.
|
||||
* The parsed type should either be;
|
||||
* <ul>
|
||||
* <li>{@link DateTimeFormatterBuilder.ZoneTextPrinterParser#UNDEFINED}</li>
|
||||
* <li>{@link DateTimeFormatterBuilder.ZoneTextPrinterParser#STD}</li>
|
||||
* <li>{@link DateTimeFormatterBuilder.ZoneTextPrinterParser#DST}</li>
|
||||
* <li>{@link DateTimeFormatterBuilder.ZoneTextPrinterParser#GENERIC}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param type the parsed zone name type
|
||||
*/
|
||||
void setParsedZoneNameType(int type) {
|
||||
currentParsed().zoneNameType = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores the parsed leap second.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue