Make WordPress Core

Opened 4 weeks ago

Last modified 4 weeks ago

#48650 new defect (bug)

Clarify function descriptions for get_gmt_from_date() and get_date_from_gmt()

Reported by: johnbillion Owned by:
Milestone: 5.4 Priority: normal
Severity: normal Version: 1.2
Component: Date/Time Keywords: has-patch
Focuses: Cc:
PR Number:


The descriptions for these functions don't make sense, which doesn't help developers who are trying to make use of them.

Attachments (1)

48650.diff (1.8 KB) - added by johnbillion 4 weeks ago.

Download all attachments as: .zip

Change History (4)

4 weeks ago

#1 @johnbillion
4 weeks ago

  • Keywords has-patch added; needs-patch removed

48650.diff is my proposed patch.

cc @rarst can you confirm that these descriptions are accurate please?

#2 @Rarst
4 weeks ago

Looks good, one small thing is that I've been trying to move towards saying UTC, rather than GMT time zone in documentation.

While colloquially these are synonyms, speaking technically GMT is a different historical thing and what we actually use and operate with on PHP level is UTC.

I leave existing gmt in code and we have it hardwired into API and database schema, but on documentation level I feel UTC is more appropriate to describe what is going on.

#3 @Rarst
4 weeks ago

Also returns could probably use a comma: Formatted version of the date provided, in UTC timezone., otherwise it can be read different way.

Last edited 4 weeks ago by Rarst (previous) (diff)
Note: See TracTickets for help on using tickets.