Open DoobleD opened 2 years ago
How is that related to this sqlite wrapper in general? Sounds more like a general WordPress issue with the system / PHP timezone.
Well the issue didn't arise when I tested with MySQL, and with a PostgreSQL plugin, on the same host.
I thought perhaps it could come from the NOW
and/or CURDATE
emumations. By default SQLite's date
function returns time in UTC, whereas it looks like MySQL and PostgreSQL NOW
functions return time in the local timezone (respective docs here, here and here).
Just a guess though, I haven't tested further. I instead changed the host timezone to UTC.
I know it doesn't address your bug report directly, but you shouldn't change the timezone from UTC on a server running WordPress as it can cause time calculations to be doubled up or cancelled out. Info here: https://github.com/johnbillion/wp-crontrol/wiki/PHP-default-timezone-is-not-set-to-UTC
Looks like NOW
and CURDATE
are implemented to use PHP's date
function so they would indeed be subject to whatever the configured timezone is for PHP. If these should always be UTC, that should be straightforward to correct.
Thank you for this sqlite port!
When the host time is not
UTC
(for instanceEurope/Paris
), new posts can't be published. Instead, they're instantly in a missed schedule state.Changing the WP timezone from Settings > General > Timezone doesn't solve the issue.