Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 3 years 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:


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

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

its working corectliy.

Change History (3)

#1 @nacin
5 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.

#2 @filosofo
5 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.

#3 @nacin
3 years 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.