From f61f9e7cb1acf04cfc1041eb9c04fd0911d4f4fe Mon Sep 17 00:00:00 2001 From: honzapatCZ Date: Wed, 18 Sep 2024 21:01:07 +0200 Subject: [PATCH] dateTime fix --- Utils/DateTimeConverter.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Utils/DateTimeConverter.cs b/Utils/DateTimeConverter.cs index e30d161..b6dbb10 100644 --- a/Utils/DateTimeConverter.cs +++ b/Utils/DateTimeConverter.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Text.Json; using System.Text.Json.Serialization; @@ -7,7 +8,7 @@ namespace NejCommon.Utils { public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - return DateOnly.Parse(reader.GetString() ?? string.Empty); + return DateOnly.Parse(reader.GetString() ?? string.Empty, CultureInfo.InvariantCulture); } public override void Write(Utf8JsonWriter writer, DateOnly value, JsonSerializerOptions options)