Skip to content

Commit

Permalink
Merge pull request #611 from PinguApps/bug/multiformat-date-converter…
Browse files Browse the repository at this point in the history
…-needs-more-formats

Added additional formats to multi format date converter
  • Loading branch information
pingu2k4 authored Jan 8, 2025
2 parents f9f2f33 + ad59902 commit edc25ff
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ public class MultiFormatDateTimeConverter : JsonConverter<DateTime>
{
private readonly string[] _formats = [
"yyyy-MM-ddTHH:mm:ss.fffzzz",
"yyyy-MM-dd HH:mm:ss.fff"
"yyyy-MM-dd HH:mm:ss.fff",
"yyyy-MM-ddTHH:mm:ss.ffzzz",
"yyyy-MM-dd HH:mm:ss.ff",
"yyyy-MM-ddTHH:mm:ss.fzzz",
"yyyy-MM-dd HH:mm:ss.f"
];

public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Expand Down

0 comments on commit edc25ff

Please sign in to comment.