Skip to content

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

Merged
taylorotwell merged 1 commit intolaravel:5.6from
pinguinjkeke:5.6-sqlite
Feb 27, 2018
Merged

[5.6] Fix whereTime method for SQLiteGrammar with correct formatting.#23321
taylorotwell merged 1 commit intolaravel:5.6from
pinguinjkeke:5.6-sqlite

Conversation

@pinguinjkeke
Copy link
Copy Markdown
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
Copy Markdown
Contributor

sisve commented Feb 27, 2018

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

@pinguinjkeke
Copy link
Copy Markdown
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