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

[5.5] Fix SQLiteGrammar whereTime method with correct formatting. #23316

Closed
wants to merge 1 commit into from
Closed

[5.5] Fix SQLiteGrammar whereTime method with correct formatting. #23316

wants to merge 1 commit into from

Conversation

pinguinjkeke
Copy link
Contributor

@pinguinjkeke pinguinjkeke commented Feb 27, 2018

strftime('time', created_at) is not working for sqlite and we need to apply correct formatting %H:%M:%S.

It also should be merged to 5.6 and master branches.

You can read more about sqlite date functions here: https://www.sqlite.org/lang_datefunc.html

@sisve
Copy link
Contributor

sisve commented Feb 27, 2018

What is the current behavior, and how can we be sure that this doesn't cause problems for existing installations?

@pinguinjkeke
Copy link
Contributor Author

pinguinjkeke commented Feb 27, 2018

@sisve currently, ->whereTime() method does nothing and no filtering is performed.

SQLite's strftime function accepts formatting string. Passing 'time' to it returns 'time' string instead of expected %H:%M:%S formatted time string.
In example, comparing 'time' string and provided time like '12:00' does nothing.

@taylorotwell
Copy link
Member

Wrong branch. 5.6 is the current release.

@pinguinjkeke
Copy link
Contributor Author

@taylorotwell It's a bugfix. Shouldn't it be merged to current LTS version?

From Laravel contribution doc:
All bug fixes should be sent to the latest stable branch or to the current LTS branch (5.5). Bug fixes should never be sent to the master branch unless they fix features that exist only in the upcoming release.

@pinguinjkeke
Copy link
Contributor Author

@taylorotwell it should be merged with #23321

@pinguinjkeke
Copy link
Contributor Author

@sisve @taylorotwell ping

@sisve
Copy link
Contributor

sisve commented Mar 2, 2018

I do not have the power of merging. Try sending a new PR with identical content.

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

Successfully merging this pull request may close these issues.

3 participants