WordPress.org

Making WordPress.org

Opened 14 months ago

Closed 14 months ago

Last modified 14 months ago

#3511 closed defect (fixed)

Sometimes Status_Transitions::transition_post_status() stores the date as -62169984000

Reported by: dd32 Owned by: dd32
Milestone: Priority: normal
Component: Plugin Directory Keywords:
Cc:

Description

While investigating some off numbers in the stats report, i found something off in the date data we're storing.

Sometimes Status_Transitions::transition_post_status() stores the date as -62169984000 on this line:
https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-status-transitions.php?rev=6534&marks=152,153#L121

-62169984000 is strtotime( '0000-00-00 00:00:00' ).

Change History (3)

#1 @dd32
14 months ago

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

In 6873:

Plugin Directory: Attempt to avoid storing invalid dates in postmeta for status changes. If the post modified date isn't available, assume now.

I'm not entirely sure post_modified_gmt is the correct field to use here, I suspect post_modified would be better, or perhaps even just using time() in all cases, but once again, I'm not sure why post_modified_gmt was used here instead.

Fixes #3511.

#2 follow-up: @ocean90
14 months ago

Probably related to [6592].

#3 in reply to: ↑ 2 @dd32
14 months ago

Replying to ocean90:

Probably related to [6592].

It looked to be related to plugins from the last 7 days, but could've easily been an operation on a plugin submitted from before that changeset that caused it.

Note: See TracTickets for help on using tickets.