Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

Conversation

@adamsilverstein
Copy link

  • Moves the $date_gmt blank check below the check for $date available, so $date is used if passed
  • Fixes an issue where creating a new post with the API returned an object with all datetime fields set to null.
  • After this fix, the API properly returns parsed dates for date and date_modified and null for date_gmt and date_modified_gmt, matching the database state

* Fixes an issue where creating a new post with the API returned an object with all datetime fields set to null.
* After this fix, the API properly returns parsed dates for `date` and `date_modified` and `null` for `date_gmt` and `date_modified_gmt`, matching the database state
@danielbachhuber
Copy link
Member

Fixes an issue where creating a new post with the API returned an object with all datetime fields set to null.

@adamsilverstein Can you share an example of this, so we have full history of the issue?

@adamsilverstein
Copy link
Author

@danielbachhuber:

Sure, I am using the JS client to create a new post. the newly created post has null values returned for the date fields by the api before this patch.

Before the patch the following two date values are null, after the patch they show the proper date:

Before:

After:

screenshot

rachelbaker added a commit that referenced this pull request Jan 12, 2016
…reating-post

In `prepare_date_response` parse $date if available
@rachelbaker rachelbaker merged commit 5190f08 into develop Jan 12, 2016
@rachelbaker rachelbaker deleted the fixes/returned-timestamps-when-creating-post branch January 12, 2016 22:36
@danielbachhuber danielbachhuber added this to the 2.0 Beta 11 milestone Jan 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants