Skip to content

Commit

Permalink
Use invariant culture in DateFormatConverter
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfeeddeadbeef committed Apr 10, 2022
1 parent 7575b07 commit ef2b3d4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/TBC.OpenBanking.Jws/src/Internals/DateFormatConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ namespace TBC.OpenBanking.Jws;
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
using CultureInfo = System.Globalization.CultureInfo;

internal sealed class DateFormatConverter : JsonConverter<DateTime>
{
Expand All @@ -38,6 +37,6 @@ public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, Jso

public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options)
{
writer.WriteStringValue(value.ToString(DateTimeFormatString));
writer.WriteStringValue(value.ToString(DateTimeFormatString, CultureInfo.InvariantCulture));
}
}

0 comments on commit ef2b3d4

Please sign in to comment.