Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add microsecond support for ISO 8601 datetime formats #12511

Closed
wants to merge 1 commit into from
Closed

Add microsecond support for ISO 8601 datetime formats #12511

wants to merge 1 commit into from

Conversation

himynameistimli
Copy link
Contributor

Description

When attempting to use formatString to format dates in GraphQL, we get "Invalid date", which I believe is due to the precision format of seconds.

From what I've seen in other issues/PRs, it seems to be related to the list of formats in type-date.js file. It seems to only have ISO formats with millisecond precision (YYYY-MM-DDTHHmmss.SSS). We're using a python backend api for page generation and their default precision is in microseconds (YYYY-MM-DDTHHmmss.SSSSSS).

(ref: https://docs.python.org/3.7/library/datetime.html)

The proposed fix is to add microseconds support for UTC and local time.

Related Issues

Related to #4813

@himynameistimli himynameistimli requested a review from a team as a code owner March 12, 2019 10:23
@sidharthachatterjee
Copy link
Contributor

This looks great to me, @himynameistimli

Worth adding a few tests?

@freiksenet
Copy link
Contributor

We are working on big changes to GraphQL in #11480. We plan to merge it next week. I wonder if you could either wait until next week and make a new PR against master or just make the PR for the schema refactor branch. Otherwise there will be merge conflicts that might result in this code getting lost.

Thanks!

Copy link
Contributor

@freiksenet freiksenet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^

@himynameistimli
Copy link
Contributor Author

Alright let me PR it against the schema refactor branch for now.

@himynameistimli himynameistimli changed the base branch from master to schema-refactor-new March 12, 2019 14:07
@himynameistimli himynameistimli changed the base branch from schema-refactor-new to master March 12, 2019 14:08
@DSchau DSchau added the status: blocked This issue/PR can't be solved at the moment and shouldn't be closed/merged label Mar 12, 2019
@himynameistimli
Copy link
Contributor Author

Closing this PR, see #12533

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: blocked This issue/PR can't be solved at the moment and shouldn't be closed/merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants