Skip to content

Allow sub milliseconds for DateTime #2843

@n1ru4l

Description

@n1ru4l

Is your feature request related to a problem? Please describe.

RFC 3993 supports nano seconds.

The serialize method of DateTime always returns a Date object.
The problem with this is that the Date implementation in Node.js drops nano seconds.

E.g. a date string of 2025-06-04T09:46:50.423231501+00:00 will become 2025-06-04T09:46:50.423+00:00

- 2025-06-04T09:46:50.423231501+00:00
+ 2025-06-04T09:46:50.423+00:00

Describe the solution you'd like

Using the DateTime scalar should not remove nano seconds. This would be a breaking change as the scalar seralize/parse output must be a string and can no longer be a Date instance.

Describe alternatives you've considered

Create my own DateTime64 scalar inspired by clickhouse

Additional context

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