dateTime fix
This commit is contained in:
parent
c935322bc0
commit
f61f9e7cb1
|
|
@ -1,3 +1,4 @@
|
||||||
|
using System.Globalization;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
|
@ -7,7 +8,7 @@ namespace NejCommon.Utils
|
||||||
{
|
{
|
||||||
public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
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)
|
public override void Write(Utf8JsonWriter writer, DateOnly value, JsonSerializerOptions options)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user