WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 3 years ago

Last modified 19 months ago

#14391 closed defect (bug) (wontfix)

Cron Jobs work on wrong time

Reported by: danielhuesken Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Cron API Keywords: cron
Focuses: Cc:

Description

Cron jobs runs on German Pages 2 Houers later as Scheduled!

if I'm change the wp-cron.php the line:
$local_time = time();
to
$local_time = current_time('timestamp');

its working corectliy.

Change History (3)

comment:1 nacin4 years ago

The cron API uses GMT time, not local time. Note time() in wp-includes/cron.php and check_and_publish_future_post() trying to strtotime() the post's post_date_gmt.

comment:2 filosofo3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

As nacin says, the variable may be confusingly named, but it is meant to be GMT.

comment:3 nacin19 months ago

In [21954]:

Use $gmt_time rather than $local_time in cron, since it uses GMT/UTC and not a local timestamp. see #14391.

Note: See TracTickets for help on using tickets.