KEMBAR78
System.Text.Json default DateTimeZoneHandling · Issue #1566 · dotnet/runtime · GitHub
Skip to content

System.Text.Json default DateTimeZoneHandling #1566

@btecu

Description

@btecu

In JSON.NET you can:

JsonConvert.DefaultSettings = () => new JsonSerializerSettings {
    DateTimeZoneHandling = DateTimeZoneHandling.Utc
};

Is there anything similar in System.Text.Json?
If there is not an option to set the default, can it be passed in manually?

Also, what is the default (Local, Utc, Unspecified)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Text.JsonwishlistIssue we would like to prioritize, but we can't commit we will get to it yet

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions