• Hi,

    I get “Incorrect DATETIME value: ‘0000%” if I open the calender. In
    wordpress/wp-content/plugins/editorial-calendar/edcal.php

    
     /* 
             * We add a WHERE clause to filter by calendar date and/or by whether
             * or not the posts have been scheduled to a specific date:
             * WHERE <code>post_date_gmt</code> = '0000-00-00 00:00:00'
             */
            add_filter( 'posts_where', array(&$this, 'edcal_filter_where' ));
            $myposts = query_posts($args);
            remove_filter( 'posts_where', array(&$this, 'edcal_filter_where' ));
    

    seems to be wrong. Zero dates are not allowed in MySQL 8 by default.

    Best regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • We’ve seen a similar issue to this before. The problem was the where clause we were using. I know this works in some configurations of MySQL 8. Do you have any special configurations or settings in your MySQL?

    Thread Starter Dr. Ronny Harbich

    (@raubvogel)

    Thanks! My config seems to be default:

    sql_mode = STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

    According to https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html

    
    The default SQL mode in MySQL 8.0 includes these modes: ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, and NO_ENGINE_SUBSTITUTION. 
    

    My config is somewhat less restrictive.

    
    mysql --version
    mysql  Ver 8.0.16 for Linux on x86_64 (MySQL Community Server - GPL)
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Zero Dates and MySQL 8’ is closed to new replies.