Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 20 months ago

#14391 closed defect (bug) (wontfix)

Cron Jobs work on wrong time

Reported by: danielhuesken's profile 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)

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