Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#48650 closed defect (bug) (fixed)

Clarify function descriptions for get_gmt_from_date() and get_date_from_gmt()

Reported by: johnbillion's profile johnbillion Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.4 Priority: normal
Severity: normal Version: 1.2
Component: Date/Time Keywords: has-patch
Focuses: Cc:

Description

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 years ago.

Download all attachments as: .zip

Change History (5)

@johnbillion
4 years ago

#1 @johnbillion
4 years 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 years 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 years 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 years ago by Rarst (previous) (diff)

#4 @SergeyBiryukov
4 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 46958:

Docs: Clarify descriptions for get_gmt_from_date() and get_date_from_gmt().

Props johnbillion, Rarst.
Fixes #48650.

Note: See TracTickets for help on using tickets.