Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#9162 closed defect (bug) (fixed)

wp-mail.php is posting with a future timestamp

Reported by: lincolnadams's profile lincolnadams Owned by:
Milestone: 2.8 Priority: normal
Severity: major Version: 2.7
Component: General Keywords: has-patch
Focuses: Cc:

Description

WP-Mail is posting timestamp several hours into the future depending on one's time zone. The problem seems to be due to a line 130 of wp-mail.php:

$post_date = gmdate('Y-m-d H:i:s', $ddate_U + $time_difference);

The problem is those who have negative GMT time zones will see their postings made at future times instead of the correct times. Those who have postives GMT zones are probably not affected.

A temporary workaround is to modify $ddate_U + $time_difference); so that it subtracts instead of adds: $post_date = gmdate('Y-m-d H:i:s', $ddate_U - $time_difference);

However, a more permanent fix is needed.

Attachments (1)

mail_gmt_offset.patch (431 bytes) - added by Hirvine 15 years ago.
Removes absint

Download all attachments as: .zip

Change History (4)

@Hirvine
15 years ago

Removes absint

#1 @Hirvine
15 years ago

The initial value of $time_difference seems to be the problem.
Removing the absint seems to be safe regarding functions.php and formatting.php.

#2 @Denis-de-Bernardy
15 years ago

  • Keywords has-patch added; wp-mail removed

See: #9588. It's very likely related.

#3 @ryan
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [11066]) Don't absint gmt_offset. Props Hirvine. fixes #9162

Note: See TracTickets for help on using tickets.