Skip to content

DateTimes lose their kind on persistence, becoming ambiguous #873

Closed
@DumpsterDoofus

Description

@DumpsterDoofus

Description

According to the JSON:API recommendations, datetimes should use an unambiguous ISO 8601 format. However, it appears that DateTime.Kind is lost on persistence, causing subsequent operations to return timestamps with DateTimeKind.Unspecified, which is ambiguous:

image

For example, if you post a new entity with a datetime like 2020-11-04T01:30:53.113Z (which is unambiguous), the response datetime comes back like 2020-11-03T20:30:53.113 (which is ambiguous, especially if clients operate in a different timezone than the server).

Environment

  • JsonApiDotNetCore Version: v4.0.0-alpha5

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions