[buddypress-trac] [BuddyPress Trac] #8536: Add GMT gates to component objects

buddypress-trac noreply at wordpress.org
Sat Jul 24 23:14:30 UTC 2021


#8536: Add GMT gates to component objects
-------------------------+------------------------------------------
 Reporter:  espellcaste  |      Owner:  espellcaste
     Type:  enhancement  |     Status:  assigned
 Priority:  normal       |  Milestone:  10.0.0
Component:  Core         |    Version:  9.0.0
 Severity:  normal       |   Keywords:  needs-patch needs-unit-tests
-------------------------+------------------------------------------
 WordPress core has GMT dates to most, if not all, objects that support
 date. BuddyPress doesn't follow this unwritten "rule". Component objects
 such as Activity, Group, Friendship, etc add dates in the object response
 but not their GMT version.

 This request came up recently, https://github.com/buddypress/BP-
 REST/issues/417, to add GMT dates to the BP REST API endpoints and instead
 of adding GMT dates in the endpoints response in the plugin, I'd like to
 properly add support in BuddyPress core and use it there.

 Since there is no standard to the names of the dates in the components
 currently, I'd probably just follow the names adding `_gmt` to the end.

 Here is an example from the `BP_Groups_Group` class:

 - `date_created`
 - `date_created_gmt`

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8536>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list