RFR: JDK-8166138 - DateTimeFormatter.ISO_INSTANT should handle offsets

naoto.sato at oracle.com naoto.sato at oracle.com
Wed Sep 19 20:04:59 UTC 2018


Hi Pallavi,

Thank you for working on this. I think the javadoc should also be 
updated, mentioning offset parsing.

Naoto

On 9/19/18 10:15 AM, Pallavi Sonal wrote:
> Hi,
> 
> Please review the changes to the following issue:
> 
> Bug : https://bugs.openjdk.java.net/browse/JDK-8166138
> 
>   
> 
> The proposed fix is located at:
> 
> Webrev : http://cr.openjdk.java.net/~rpatil/8166138/webrev.00/
> 
>   
> 
> As per ISO 8601 standards, an offset of zero, in addition to having the special representation "Z", can also be stated numerically as "+00:00", "+0000", or "+00" [1].  With this fix, Instant.parse() can parse a String containing the zero offsets in any of these three forms. Any other offset apart from "Z", "+00:00", "+0000", or "+00" will not be accepted in the input string to be parsed.
> 
>   
> 
> [1] https://en.wikipedia.org/wiki/ISO_8601
> 
>   
> 
> Thanks,
> 
> Pallavi Sonal
> 
>   
> 
>   
> 


More information about the core-libs-dev mailing list