Skip to content

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

@Eilon

Description

@Eilon

From @kennywangjin on Wednesday, 08 May 2019 06:35:39

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

Copied from original issue: dotnet/aspnetcore#10070

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions