WordPress.org

Support

Support » How-To and Troubleshooting » Timezones and wp_cron

Timezones and wp_cron

  • I’ve got a slight problem:

    date_i18n($time_format) returns the time with the users current timezone offset applied and formatted to their format.

    date_i18n(get_option(‘time_format’),wp_next_scheduled(‘my_cron_job’)

    returns the next execute time of the specified cron job with the users current timezone offset applied and formatted appropriately.

    UNLESS they are running on FASTCGI when it seems to return the next execute time in GMT/UTC.

    So I think what is happening is that when you set the cron_job up its setting it up with the wrong timestamp when you are using FastCGI.

    Can someone else confirm this as I don’t use FastCGI on my server.

Viewing 1 replies (of 1 total)
  • Actually I think it was me

    There is a difference between time() and current_time( ‘timestamp’ ) on some systems.

Viewing 1 replies (of 1 total)
  • The topic ‘Timezones and wp_cron’ is closed to new replies.
Skip to toolbar