#19027 closed task (blessed) (fixed)
XML-RPC metaWeblog.getPost and metaWeblog.getRecentPosts don't return posts' modification date.
Reported by: | ocollet | Owned by: | josephscott |
---|---|---|---|
Milestone: | 3.4 | Priority: | normal |
Severity: | normal | Version: | 3.3 |
Component: | XML-RPC | Keywords: | has-patch commit dev-reviewed |
Focuses: | Cc: |
Description
If a post has been modified, there's currently no way to get the date it happened. When retrieving a single or several posts via XML-RPC, the only date returned is the creation date.
This would help to have the modification date, especially in the case of data synchronization.
Attachments (3)
Change History (13)
#2
follow-up:
↓ 3
@
13 years ago
- Keywords commit added
I like this change, with one exception. The only new field that we should expose is 'date_modified_gmt'. Time zone issues were a major source of confusion for many clients, which is why I added the GMT data fields. I think exposing more non-GMT data at this point will only increase that confusion.
I uploaded a modified version of your diff : http://core.trac.wordpress.org/attachment/ticket/19027/xmlrpc.diff - with just the 'date_modified_gmt' field.
I'd be fine with committing this modified diff.
#3
in reply to:
↑ 2
;
follow-up:
↓ 4
@
13 years ago
Replying to josephscott:
I like this change, with one exception. The only new field that we should expose is 'date_modified_gmt'. Time zone issues were a major source of confusion for many clients, which is why I added the GMT data fields. I think exposing more non-GMT data at this point will only increase that confusion.
Since these date_modified
fields are read-only, I'm not as concerned with exposing both GMT and non-GMT versions. If you only expose the GMT version, then XML-RPC clients have to do their own datetime math (and call getOption to figure out the blog display timezone) to determine what the displayed value should be.
#4
in reply to:
↑ 3
;
follow-up:
↓ 5
@
13 years ago
Replying to maxcutler:
If you only expose the GMT version, then XML-RPC clients have to do their own datetime math (and call getOption to figure out the blog display timezone) to determine what the displayed value should be.
I agree. We should expose both the GMT and local post modified fields ... but we should be consistent in how we name them. If we're using post_modified_gmt
we should also use post_modified
rather than postModified
.
#5
in reply to:
↑ 4
@
13 years ago
I was actually trying to get consistent with the postCreated
property, therefore my suggestion to have the following fields:
postCreated
, postModified
, post_date_gmt
and post_modified_gmt
.
Replying to ericmann:
Replying to maxcutler:
If you only expose the GMT version, then XML-RPC clients have to do their own datetime math (and call getOption to figure out the blog display timezone) to determine what the displayed value should be.
I agree. We should expose both the GMT and local post modified fields ... but we should be consistent in how we name them. If we're using
post_modified_gmt
we should also usepost_modified
rather thanpostModified
.
#7
@
13 years ago
- Type changed from enhancement to task (blessed)
After further discussion I agree that exposing the non-GMT modified date won't hurt anything. My primary recommendation to clients is still to use the GMT field.
I've uploaded xmlrpc.2.diff which is basically the original patch with a few minor changes. The fields are date_modified and date_modified_gmt since there are no existing camelcase field names that we need to worry about in terms of backwards compatibility.
#8
@
13 years ago
- Keywords dev-reviewed added
- Milestone changed from Awaiting Review to 3.4
- Owner set to josephscott
- Status changed from new to assigned
This patch looks good - I think we should always expose both our internal GMT representation of a date and the timezone adjusted date because they won't necessarily be based on the current Timezone config of the blog - timezone changes, DST, etc.
Added the post modification date to metaWeblog.getRecentPosts and metaWeblog.getPost