diff --git a/xml/System.Xml/XmlConvert.xml b/xml/System.Xml/XmlConvert.xml index b9f186eaf40..f6457d873cc 100644 --- a/xml/System.Xml/XmlConvert.xml +++ b/xml/System.Xml/XmlConvert.xml @@ -1123,13 +1123,17 @@ The contains additional methods that validate token The string to convert. - The format from which is converted. The format parameter can be any subset of the W3C Recommendation for the XML dateTime type. (For more information, see the dateTime section of the XML Schema specification..) The string is validated against this format. + A .NET standard or custom date and time format string that specifies the required format of . Converts the supplied to a equivalent. The equivalent of the supplied string. with and the and flags. Leading and trailing whitespace is ignored, but `s` must otherwise exactly match `format`. The `format` parameter uses .NET [standard date and time format strings](/dotnet/standard/base-types/standard-date-and-time-format-strings) or [custom date and time format strings](/dotnet/standard/base-types/custom-date-and-time-format-strings), not XML Schema dateTime patterns. + + In a custom format string, the `z`, `zz`, and `zzz` specifiers require a signed numeric UTC offset. They don't match the XML UTC designator `Z`. Use the `K` custom format specifier when `s` can contain `Z`. + If the offset specified within the input string will cause an overflow in the deserialized representation of the DateTimeOffset, a FormatException is thrown. When more than seven digits are specified for fractional seconds, the value is rounded. For example, 00000004 becomes 0000000 and 00000005 becomes 0000001. @@ -1161,7 +1165,7 @@ The contains additional methods that validate token is . - or is an empty string or is not in the specified format. + is invalid, or doesn't exactly match under the invariant culture rules, except for leading or trailing white space. @@ -1206,13 +1210,17 @@ The contains additional methods that validate token The string to convert. - An array of formats from which can be converted. Each format in can be any subset of the W3C Recommendation for the XML dateTime type. (For more information, see the dateTime section of the XML Schema specification..) The string is validated against one of these formats. + An array of .NET standard or custom date and time format strings that specify the permitted formats of . Converts the supplied to a equivalent. The equivalent of the supplied string. with and the and flags. Leading and trailing white space is ignored, but `s` must otherwise exactly match one of the strings in `formats`. The `formats` parameter uses .NET [standard date and time format strings](/dotnet/standard/base-types/standard-date-and-time-format-strings) or [custom date and time format strings](/dotnet/standard/base-types/custom-date-and-time-format-strings), not XML Schema dateTime patterns. + + In a custom format string, the `z`, `zz`, and `zzz` specifiers require a signed numeric UTC offset. They don't match the XML UTC designator `Z`. Use the `K` custom format specifier when `s` can contain `Z`. + If the offset specified within the input string will cause an overflow in the deserialized representation of the DateTimeOffset, a FormatException is thrown. When more than seven digits are specified for fractional seconds, the value is rounded. For example, 00000004 becomes 0000000 and 00000005 becomes 0000001. @@ -1241,6 +1249,7 @@ The contains additional methods that validate token ]]> + An element of is invalid, or doesn't exactly match any element of under the invariant culture rules, except for leading or trailing white space.