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

BUGFIX: Fix format for json_encoded DateTime conversion #1438

Merged
merged 1 commit into from Nov 25, 2018

Conversation

Projects
None yet
4 participants
@albe
Copy link
Member

albe commented Nov 16, 2018

The format for converting from JSON encoded DateTime was wrong. The format doesn't use the \T separator, but a whitespace and as it seems, v is not a valid format specifier for DateTime::createFromFormat while it is for date().

http://php.net/manual/en/datetime.createfromformat.php

In most cases, the same letters as for the date() can be used.

Also, this provides a test to actually verify the functionality.
Related to #1415

BUGFIX: Fix format for json_encoded DateTime conversion
Also, this provides a test to actually verify the functionality.
Related to #1415

@albe albe requested review from kitsunet and daniellienert Nov 16, 2018

@albe

This comment has been minimized.

Copy link
Member Author

albe commented Nov 16, 2018

A good example why covering new behaviour with tests is important, even with code review in place. Blaming myself for not getting the test, which was really easy to do, done earlier.

@dimaip

dimaip approved these changes Nov 16, 2018

@daniellienert
Copy link
Member

daniellienert left a comment

Looks good again :) Thanks for the test, which should ensure the correct behavior.

@jonnitto jonnitto merged commit a00a751 into neos:4.3 Nov 25, 2018

2 checks passed

continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@albe albe deleted the albe:json-datetime-fix branch Nov 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.