WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 2 months ago

#15946 new defect (bug)

post_date_gmt ignored in wp_insert_post()

Reported by: kawauso Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 3.1
Component: Posts, Post Types Keywords: has-patch dev-feedback
Focuses: Cc:

Description

If a post is inserted with post_date_gmt set and post_date not, post_date defaults to the current date/time, rather than being generated from post_date_gmt

Attachments (2)

15946.diff (1.2 KB) - added by kawauso 3 years ago.
Generate post date from GMT if present and remove redundant part of if() clause
15946.2.diff (2.2 KB) - added by oso96_2000 2 months ago.
Refreshed patch with unit test

Download all attachments as: .zip

Change History (5)

kawauso3 years ago

Generate post date from GMT if present and remove redundant part of if() clause

comment:1 nacin3 years ago

  • Milestone changed from Awaiting Review to Future Release

comment:2 nacin3 months ago

  • Component changed from General to Post Types

oso96_20002 months ago

Refreshed patch with unit test

comment:3 oso96_20002 months ago

  • Keywords dev-feedback added

Hello @kawauso! Thanks for the patch, sorry fort aking too long to respond. I refreshed it and added a unit test.

Note: See TracTickets for help on using tickets.