Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter velozer

    (@velozer)

    I have changed the table wp_track_the_click_hit.
    In the field ‘timestamp’ I’ve put the value ‘CURRENT_TIMESTAMP’.

    CREATE TABLEwp_track_the_click_hit` (
    id bigint UNSIGNED NOT NULL,
    link_id bigint UNSIGNED NOT NULL,
    timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;`

    Now works fine!

    Thanks a lot.

    Thread Starter velozer

    (@velozer)

    This var is enabled:

    mysql> show variables like 'explicit_defaults_for_timestamp';
    +---------------------------------+-------+
    | Variable_name                   | Value |
    +---------------------------------+-------+
    | explicit_defaults_for_timestamp | ON    |
    +---------------------------------+-------+
    1 row in set (0.00 sec)

    I just tested with the variable enabled and disabled and the result is the same.

    Thread Starter velozer

    (@velozer)

    Yes, the records still “0000-00-00 00:00:00”.
    The MySQL is normal:mysql-community-server-8.0.23

    Thread Starter velozer

    (@velozer)

    Hello,

    Thanks for your answer.
    I’ve checked the timezone and I found that it was erroneous on WordPress.
    But after corrected it, the problem is not solved.
    Also, I’ve uninstalled and installed again, but not works.

    timedatectl
          Local time: Tue 2022-03-29 12:43:43 CEST
      Universal time: Tue 2022-03-29 10:43:43 UTC
            RTC time: Tue 2022-03-29 10:43:43
           Time zone: Europe/Madrid (CEST, +0200)
         NTP enabled: yes
    NTP synchronized: yes
     RTC in local TZ: no
          DST active: yes
Viewing 4 replies - 1 through 4 (of 4 total)