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

Support ISO8601 with hours timeshift only #2421

Merged
merged 1 commit into from
Aug 5, 2020
Merged

Conversation

mzl-md
Copy link
Contributor

@mzl-md mzl-md commented Jul 28, 2020

Fix for #2419

@hueniverse hueniverse merged commit 4cb24b4 into hapijs:master Aug 5, 2020
@hueniverse hueniverse self-assigned this Aug 5, 2020
@hueniverse hueniverse added the bug Bug or defect label Aug 5, 2020
@hueniverse hueniverse added this to the 17.2.0 milestone Aug 5, 2020
hueniverse added a commit that referenced this pull request Aug 5, 2020
Copy link
Contributor

@kanongil kanongil left a comment

Choose a reason for hiding this comment

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

I forgot to submit these. It is still relevant, and as the code will bug in Safari.

@@ -800,6 +800,11 @@ internals.isoDate = function (value) {
return null;
}

// add missing trailing zeros to timeshift
if (/.*T.*[+-]\d\d$/.test(value)) {
value += '00';
Copy link
Contributor

Choose a reason for hiding this comment

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

You need to add the : as well to make it a proper extended iso date string. As it is, it breaks in Safari.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This PR is already closed and merged into the master and published in v17.2.0.
I think this issue has to become a new ticket now.

@@ -800,6 +800,11 @@ internals.isoDate = function (value) {
return null;
}

// add missing trailing zeros to timeshift
if (/.*T.*[+-]\d\d$/.test(value)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The initial .* is redundant.

@hueniverse hueniverse mentioned this pull request Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug or defect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants