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.6] Fix whereTime method for SQLiteGrammar with correct formatting. #23321

Merged
merged 1 commit into from
Feb 27, 2018
Merged

[5.6] Fix whereTime method for SQLiteGrammar with correct formatting. #23321

merged 1 commit into from
Feb 27, 2018

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.

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.

It's a bug. ->whereTime() function doesn't works as expected when using sqlite. So, it should be merged to 5.5 LTS too, I think.

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

Could we perhaps get the PR for 5.5 reopened and merged too? #23316

@pinguinjkeke
Copy link
Contributor Author

@sisve yeah, it would be cool

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