Skip to content

System.Text.Json serialize accurate DateTime incorrectly! #10070

@kennywangjin

Description

@kennywangjin

aspnetcore3.0 preview5 using System.Text.Json as input- and outputformatter:
if DateTime is too accurate (sqlserver datetime2), it will serialize it to invalid format like: 2019-05-08T00:00:5406760219
This kind of result could not even be recognized by DateTime.Parse.
I think it should be 2019-05-08T00:00:54.06760219 (with a dot between seconds number and others) which can be parsed by DateTime class.

批注 2019-05-08 143028

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions