Comments (4)
This is caused by a little quirk in MySQL's timezones interpretation. Datetime values are not interpreted directly as UTC, but first assumed to be the timezone determined by your system, and then converted to UTC. I kept getting that error as well, but only for March dates in different years - and they always coincided with daylight saving, at early morning hours (quite strangely it didn't matter if it was North American, or European dayligt saving).
More on the issue here: https://stackoverflow.com/a/25855998/4171578 (including the comments).
I was able to fix it by going to MySQL and executing this command:
SET GLOBAL time_zone='+0:00'
from laracon2018.
That's really weird. 2011-03-13 02:27:30
is a totally valid date, and really that just gets generated by Laravel anyway via the model timestamps. Sorry, I've got nothing. I'd start Googling. 😞
from laracon2018.
Okay for sure. I think it might have something to do with the Mysql version on my home machine. I got past it using mysql version 5.7 but then ended up with
SQLSTATE[42000]: Syntax error or access violation: 1305 FUNCTION laracon2018.to_char does not exist (SQL: select count(*) as aggregate from `customers` where `birth_date` is not null and to_char(birth_date, 'MMDD') in (0409, 0410, 0411, 0412, 0413, 0414, 0415) and `sales_rep_id` = 1)
Going to leave this open in case anyone else experiences this or has other insights, if you don't mind!
from laracon2018.
@amadeann Awesome! Thanks for sharing this.
from laracon2018.
Related Issues (8)
- is possible to have feature requests file here? HOT 1
- Question on cutting down database queries for a recommended product
- More complex eager loading
- Eloquent scopes removed from subqueries HOT 1
- Fetching users that have events in a certain time interval
- Queued job fails when using subqueries with database driver HOT 5
- Fetch relations recursively avoiding n + 1 problem HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laracon2018.