From 26f5fc24d9a904204c7a1217be120d59c16fad1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Toma=C5=A1ovi=C4=8D?= Date: Thu, 9 Oct 2025 14:33:05 +0200 Subject: [PATCH 1/2] Fix DateOnly parsing --- .../csharp/libraries/generichost/DateOnlyJsonConverter.mustache | 2 +- .../generichost/DateOnlyNullableJsonConverter.mustache | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/DateOnlyJsonConverter.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/DateOnlyJsonConverter.mustache index 1441421aa299..94388357c0bd 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/DateOnlyJsonConverter.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/DateOnlyJsonConverter.mustache @@ -34,7 +34,7 @@ namespace {{packageName}}.{{clientPackage}} string value = reader.GetString(){{nrt!}}; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/DateOnlyNullableJsonConverter.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/DateOnlyNullableJsonConverter.mustache index 53fdfbee7534..11e0de144780 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/DateOnlyNullableJsonConverter.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/DateOnlyNullableJsonConverter.mustache @@ -34,7 +34,7 @@ namespace {{packageName}}.{{clientPackage}} string value = reader.GetString(){{nrt!}}; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); From 3aaea38f7d57f111e2d732803fd148cf11e7c74b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Toma=C5=A1ovi=C4=8D?= Date: Fri, 10 Oct 2025 13:55:54 +0200 Subject: [PATCH 2/2] update samples --- .../src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs | 2 +- .../Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs | 2 +- .../src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs | 2 +- .../Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs | 2 +- .../src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs | 2 +- .../Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs | 2 +- .../src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs | 2 +- .../Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs | 2 +- .../Tags/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs | 2 +- .../Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs | 2 +- .../AllOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs | 2 +- .../Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs | 2 +- .../AnyOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs | 2 +- .../Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs | 2 +- .../src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs | 2 +- .../Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs | 2 +- .../src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs | 2 +- .../Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs | 2 +- .../src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs | 2 +- .../Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs | 2 +- .../OneOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs | 2 +- .../Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs | 2 +- .../src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs | 2 +- .../Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs | 2 +- .../src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs | 2 +- .../Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs | 2 +- .../AllOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs | 2 +- .../Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs | 2 +- .../AnyOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs | 2 +- .../Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs | 2 +- .../src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs | 2 +- .../Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs | 2 +- .../src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs | 2 +- .../Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs | 2 +- .../src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs | 2 +- .../Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs | 2 +- .../OneOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs | 2 +- .../Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs | 2 +- .../src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs | 2 +- .../Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs | 2 +- .../src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs | 2 +- .../Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs | 2 +- 42 files changed, 42 insertions(+), 42 deletions(-) diff --git a/samples/client/petstore/csharp/generichost/latest/ComposedEnum/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs b/samples/client/petstore/csharp/generichost/latest/ComposedEnum/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs index fbbfa1bc4561..acf239fbeda9 100644 --- a/samples/client/petstore/csharp/generichost/latest/ComposedEnum/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/latest/ComposedEnum/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs @@ -43,7 +43,7 @@ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, Jso string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/latest/ComposedEnum/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs b/samples/client/petstore/csharp/generichost/latest/ComposedEnum/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs index 781bae3e4967..e69101609208 100644 --- a/samples/client/petstore/csharp/generichost/latest/ComposedEnum/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/latest/ComposedEnum/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs @@ -43,7 +43,7 @@ public class DateOnlyNullableJsonConverter : JsonConverter string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/latest/HelloWorld/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs b/samples/client/petstore/csharp/generichost/latest/HelloWorld/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs index 63be8509932f..f45d5c1fed8c 100644 --- a/samples/client/petstore/csharp/generichost/latest/HelloWorld/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/latest/HelloWorld/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs @@ -43,7 +43,7 @@ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, Jso string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/latest/HelloWorld/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs b/samples/client/petstore/csharp/generichost/latest/HelloWorld/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs index 0a3ee74c97f9..597cf6574325 100644 --- a/samples/client/petstore/csharp/generichost/latest/HelloWorld/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/latest/HelloWorld/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs @@ -43,7 +43,7 @@ public class DateOnlyNullableJsonConverter : JsonConverter string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs b/samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs index c9dc766e4639..04b243233ad5 100644 --- a/samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs @@ -43,7 +43,7 @@ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, Jso string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs b/samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs index 5e42c9efb856..79a84687d295 100644 --- a/samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs @@ -43,7 +43,7 @@ public class DateOnlyNullableJsonConverter : JsonConverter string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/latest/OneOfList/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs b/samples/client/petstore/csharp/generichost/latest/OneOfList/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs index 2e5274b1543d..67c131639b6b 100644 --- a/samples/client/petstore/csharp/generichost/latest/OneOfList/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/latest/OneOfList/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs @@ -43,7 +43,7 @@ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, Jso string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/latest/OneOfList/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs b/samples/client/petstore/csharp/generichost/latest/OneOfList/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs index 0481f4f135c6..5958ab9a6c19 100644 --- a/samples/client/petstore/csharp/generichost/latest/OneOfList/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/latest/OneOfList/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs @@ -43,7 +43,7 @@ public class DateOnlyNullableJsonConverter : JsonConverter string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/latest/Tags/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs b/samples/client/petstore/csharp/generichost/latest/Tags/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs index 2e5bda82ea8f..9102de63f421 100644 --- a/samples/client/petstore/csharp/generichost/latest/Tags/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/latest/Tags/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs @@ -44,7 +44,7 @@ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, Jso string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/latest/Tags/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs b/samples/client/petstore/csharp/generichost/latest/Tags/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs index 0ced717f3e38..fe89342ba7db 100644 --- a/samples/client/petstore/csharp/generichost/latest/Tags/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/latest/Tags/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs @@ -44,7 +44,7 @@ public class DateOnlyNullableJsonConverter : JsonConverter string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs b/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs index f7fe93629939..671c407f55a0 100644 --- a/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs @@ -43,7 +43,7 @@ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, Jso string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs b/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs index a5cb490f3ef1..ae9a253b5aa1 100644 --- a/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs @@ -43,7 +43,7 @@ public class DateOnlyNullableJsonConverter : JsonConverter string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net8/AnyOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs b/samples/client/petstore/csharp/generichost/net8/AnyOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs index 5009ae5304f7..ddd26d4eafca 100644 --- a/samples/client/petstore/csharp/generichost/net8/AnyOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net8/AnyOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs @@ -43,7 +43,7 @@ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, Jso string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net8/AnyOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs b/samples/client/petstore/csharp/generichost/net8/AnyOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs index 02dda463ab26..a4e9918e0aa5 100644 --- a/samples/client/petstore/csharp/generichost/net8/AnyOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net8/AnyOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs @@ -43,7 +43,7 @@ public class DateOnlyNullableJsonConverter : JsonConverter string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs b/samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs index 5009ae5304f7..ddd26d4eafca 100644 --- a/samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs @@ -43,7 +43,7 @@ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, Jso string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs b/samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs index 02dda463ab26..a4e9918e0aa5 100644 --- a/samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs @@ -43,7 +43,7 @@ public class DateOnlyNullableJsonConverter : JsonConverter string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs index 11b100056516..74dd3f152183 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs @@ -43,7 +43,7 @@ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, Jso string value = reader.GetString(); foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs index 92ef8f6c92bf..e017a70ec492 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs @@ -43,7 +43,7 @@ public class DateOnlyNullableJsonConverter : JsonConverter string value = reader.GetString(); foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs index c9dc766e4639..04b243233ad5 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs @@ -43,7 +43,7 @@ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, Jso string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs index 5e42c9efb856..79a84687d295 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs @@ -43,7 +43,7 @@ public class DateOnlyNullableJsonConverter : JsonConverter string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs b/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs index 5009ae5304f7..ddd26d4eafca 100644 --- a/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs @@ -43,7 +43,7 @@ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, Jso string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs b/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs index 02dda463ab26..a4e9918e0aa5 100644 --- a/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs @@ -43,7 +43,7 @@ public class DateOnlyNullableJsonConverter : JsonConverter string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs index 11b100056516..74dd3f152183 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs @@ -43,7 +43,7 @@ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, Jso string value = reader.GetString(); foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs index 92ef8f6c92bf..e017a70ec492 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs @@ -43,7 +43,7 @@ public class DateOnlyNullableJsonConverter : JsonConverter string value = reader.GetString(); foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs index c9dc766e4639..04b243233ad5 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs @@ -43,7 +43,7 @@ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, Jso string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs index 5e42c9efb856..79a84687d295 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs @@ -43,7 +43,7 @@ public class DateOnlyNullableJsonConverter : JsonConverter string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net9/AllOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs b/samples/client/petstore/csharp/generichost/net9/AllOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs index f7fe93629939..671c407f55a0 100644 --- a/samples/client/petstore/csharp/generichost/net9/AllOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net9/AllOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs @@ -43,7 +43,7 @@ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, Jso string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net9/AllOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs b/samples/client/petstore/csharp/generichost/net9/AllOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs index a5cb490f3ef1..ae9a253b5aa1 100644 --- a/samples/client/petstore/csharp/generichost/net9/AllOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net9/AllOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs @@ -43,7 +43,7 @@ public class DateOnlyNullableJsonConverter : JsonConverter string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net9/AnyOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs b/samples/client/petstore/csharp/generichost/net9/AnyOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs index 5009ae5304f7..ddd26d4eafca 100644 --- a/samples/client/petstore/csharp/generichost/net9/AnyOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net9/AnyOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs @@ -43,7 +43,7 @@ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, Jso string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net9/AnyOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs b/samples/client/petstore/csharp/generichost/net9/AnyOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs index 02dda463ab26..a4e9918e0aa5 100644 --- a/samples/client/petstore/csharp/generichost/net9/AnyOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net9/AnyOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs @@ -43,7 +43,7 @@ public class DateOnlyNullableJsonConverter : JsonConverter string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs b/samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs index 5009ae5304f7..ddd26d4eafca 100644 --- a/samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs @@ -43,7 +43,7 @@ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, Jso string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs b/samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs index 02dda463ab26..a4e9918e0aa5 100644 --- a/samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs @@ -43,7 +43,7 @@ public class DateOnlyNullableJsonConverter : JsonConverter string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs index 11b100056516..74dd3f152183 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs @@ -43,7 +43,7 @@ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, Jso string value = reader.GetString(); foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs index 92ef8f6c92bf..e017a70ec492 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs @@ -43,7 +43,7 @@ public class DateOnlyNullableJsonConverter : JsonConverter string value = reader.GetString(); foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs index c9dc766e4639..04b243233ad5 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs @@ -43,7 +43,7 @@ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, Jso string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs index 5e42c9efb856..79a84687d295 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs @@ -43,7 +43,7 @@ public class DateOnlyNullableJsonConverter : JsonConverter string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs b/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs index 5009ae5304f7..ddd26d4eafca 100644 --- a/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs @@ -43,7 +43,7 @@ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, Jso string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs b/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs index 02dda463ab26..a4e9918e0aa5 100644 --- a/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs @@ -43,7 +43,7 @@ public class DateOnlyNullableJsonConverter : JsonConverter string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs index 11b100056516..74dd3f152183 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs @@ -43,7 +43,7 @@ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, Jso string value = reader.GetString(); foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs index 92ef8f6c92bf..e017a70ec492 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs @@ -43,7 +43,7 @@ public class DateOnlyNullableJsonConverter : JsonConverter string value = reader.GetString(); foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs index c9dc766e4639..04b243233ad5 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Client/DateOnlyJsonConverter.cs @@ -43,7 +43,7 @@ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, Jso string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException(); diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs index 5e42c9efb856..79a84687d295 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Client/DateOnlyNullableJsonConverter.cs @@ -43,7 +43,7 @@ public class DateOnlyNullableJsonConverter : JsonConverter string value = reader.GetString()!; foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) return result; throw new NotSupportedException();