You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Scheduled posts are publishing in GMT instead of blog-specific timezone #143
Describe your use case and the problem you are facing
Consider a Wordpress instance using a blog-specific timezone setting (different from a timezone setting in php.ini). If you schedule a post for publishing the blog's specific timezone setting is used for publishing. However, runinng wp cron regularly triggered by a system cronjob, apparently considers publishing times as GMT.
Describe the solution you'd like
Would be great if blog-specific timezone settings could be incorporated for publishing posts. If a manual timezone setting is specified in php.ini, the correct publishing time is derived apparently. The timezone setting in wp-admin/options-general.php read the following from wp_options to derive the blog-specific timezone setting string $tzstring:
WP-CLI's cron-command package does not perform any custom timezone calculations or scheduling logic of its own. It relies entirely on native WordPress core cron features (such as wp_get_ready_cron_jobs()) and standard PHP functions.
Additionally, when WP-CLI bootstraps WordPress, WordPress Core forces PHP's runtime timezone to UTC (date_default_timezone_set( 'UTC' )).
If scheduled posts are not publishing at the expected local time, it is typically caused by:
An incorrect site timezone configured in Settings > General inside the WordPress Admin dashboard (which WordPress uses to compute the UTC date when scheduling).
The server's OS clock itself being out of sync (causing time() / microtime( true ) to return incorrect Unix epochs).
A plugin or theme executing custom code that alters the PHP timezone (via date_default_timezone_set()) after WordPress has loaded.
Because this is handled entirely within WordPress Core's cron functions and option configurations rather than WP-CLI, I'm going to close this issue.
Activity
swissspidy commentedon Jun 16, 2026
Thanks for opening the issue.
WP-CLI's
cron-commandpackage does not perform any custom timezone calculations or scheduling logic of its own. It relies entirely on native WordPress core cron features (such aswp_get_ready_cron_jobs()) and standard PHP functions.Additionally, when WP-CLI bootstraps WordPress, WordPress Core forces PHP's runtime timezone to UTC (
date_default_timezone_set( 'UTC' )).If scheduled posts are not publishing at the expected local time, it is typically caused by:
time()/microtime( true )to return incorrect Unix epochs).date_default_timezone_set()) after WordPress has loaded.Because this is handled entirely within WordPress Core's cron functions and option configurations rather than WP-CLI, I'm going to close this issue.