Giter Site home page Giter Site logo

Comments (1)

Jayfrown avatar Jayfrown commented on June 2, 2024

Apologies for the spam - I think I've found the issue here.

The Doctrine tab in the Symfony Profiler shows the executed database query to be the following:

SELECT t0.id AS id_1, t0.name AS name_2, t0.created_at AS created_at_3, t0.updated_at AS updated_at_4, t0.created_by AS created_by_5, t0.updated_by AS updated_by_6, t0.deleted_at AS deleted_at_7 FROM test_events t0 WHERE t0.id = ? AND (((t0.deleted_at IS NULL OR t0.deleted_at > CURRENT_TIMESTAMP)))

This appears to filter on deleted_at IS NULL or later than CURRENT_TIMESTAMP, and, yeah, wouldn't you know it:

❯ bin/console dbal:run-sql "SELECT deleted_at FROM test_events WHERE id = 0x1ec875b84ec1690e875cf7d92857e532;"
 --------------------- 
  deleted_at           
 --------------------- 
  2022-02-06 16:00:10  
 --------------------- 
 ❯ bin/console dbal:run-sql "SELECT CURRENT_TIMESTAMP;"                                                        
 --------------------- 
  CURRENT_TIMESTAMP    
 --------------------- 
  2022-02-06 15:40:49  
 --------------------- 

So I suppose this is due to my PHP application working with the Europe/Amsterdam timezone, and my database working with a different timezone, which is an hour behind from Europe/Amsterdam.

from stofdoctrineextensionsbundle.

Related Issues (20)

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.