Skip to content

Luxon Take 3: Use fromJSDate instead of fromISO for ember-cli-deploy-revision-data #42

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Oct 27, 2020

Conversation

kpfefferle
Copy link
Contributor

@kpfefferle kpfefferle commented Oct 26, 2020

What Changed & Why

I made a mistake in #41 by assuming that since console.log was spitting out 2020-10-26T16:01:36.000Z for timestamps provided from ember-cli-deploy-revision-data, those were ISO timestamps. It turns out that they are JS Date objects and console.log transforms them into that format automatically 🤦🏻‍♂️

Instead of trying to parse ISO if we don't have milliseconds, we should instead fall back to JS Date objects. Since this fallback was added especially for ember-cli-deploy-revision-data and its central place in the e-c-d ecosystem, we'll assume this format if we don't have milliseconds as this plugin documents.

Related issues

#41 (comment)

People

@koendehondt @achambers

@achambers achambers merged commit ce118e4 into ember-cli-deploy:master Oct 27, 2020
@achambers achambers added the bug label Oct 27, 2020
@achambers
Copy link
Member

Thanks @kpfefferle . 3rd time lucky ;)

Released as https://github.com/ember-cli-deploy/ember-cli-deploy-display-revisions/releases/tag/v2.1.2

@achambers
Copy link
Member

@kpfefferle Well on track for that Hacktoberfest t-shirt 😛

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants