Giter Club home page Giter Club logo

Comments (4)

amadeann avatar amadeann commented on July 28, 2024 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.

reinink avatar reinink commented on July 28, 2024

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.

connor11528 avatar connor11528 commented on July 28, 2024

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.

reinink avatar reinink commented on July 28, 2024

@amadeann Awesome! Thanks for sharing this.

from laracon2018.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.