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

buddypress-trac noreply at wordpress.org
Sat Aug 14 03:03:46 UTC 2021


#8536: Add GMT dates 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                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |
------------------------------------------+--------------------------

Comment (by espellcaste):

 Thanks @r-a-y, you are correct. I was able to confirm in several objects
 (Activity/Message/Group/Friends) that all dates are on GMT. They are saved
 as GMT unless set otherwise.

 Currently, this is wrongly set on the schema of all endpoints where date
 is used. In the BP REST API: it says the dates are ''in the site's
 timezone'' where actually they are in GMT. They are all using
 `bp_rest_prepare_date_response` which converts the date to a proper
 ISO8601 format.

 There are two possible approaches here:

 - One would be to change the schema to indicate the dates are on GMT
 instead of the site's timezone. This would not change the current date
 format.
 - The other one would be to update the default date field so that it is in
 the site's timezone and add a new key with `_gmt` as suggested in the
 description of this ticket.

 The second option is a break-ish change since we are changing the "nature"
 of the date from GMT to the one set in the site's timezone.

 cc: @imath (I'd love your feedback on this one).

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


More information about the buddypress-trac mailing list