Aspnetcore: JSON parsing doesn't handle DateTimeOffset with timezone

Created on 8 Mar 2018  路  3Comments  路  Source: dotnet/aspnetcore

Currently for DateTimeOffset, SimpleJson has:

DateTimeOffset.ParseExact(str, Iso8601Format, CultureInfo.InvariantCulture, ...

But the Iso8601Format value doesn't allow for timezone offsets, so it can't ParseExact.

We should amend SimpleJson for DateTimeOffset in the same way we did for DateTime to make it more flexible about incoming formats.

area-blazor

Most helpful comment

What's a JSON?

All 3 comments

@JamesNK What if we had a dev who was really good at JSON parsing and wanted to make the web a better place . . . 馃槂

I'm pretty sure @JamesNK has already solved this problem quite thoroughly!

What's a JSON?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rbanks54 picture rbanks54  路  3Comments

UweKeim picture UweKeim  路  3Comments

fayezmm picture fayezmm  路  3Comments

ermithun picture ermithun  路  3Comments

farhadibehnam picture farhadibehnam  路  3Comments