WordPress.org

Make WordPress Core

Opened 13 months ago

Closed 6 months ago

Last modified 2 months ago

#42542 closed enhancement (fixed)

Simplify mysql_to_rfc3339() and document RFC3339 incompatibility

Reported by: Rarst Owned by: SergeyBiryukov
Milestone: 5.1 Priority: normal
Severity: normal Version: 4.4
Component: Date/Time Keywords: has-patch
Focuses: Cc:

Description

Erasing time zone with regular expression is redundant, since date can be just formatted in respective format.

Documentation needs correction since output is absolutely not compatible with RFC3339, only the more lax ISO8601 upstream from it.

Attachments (1)

mysql_to_rfc3339.patch (1.3 KB) - added by Rarst 13 months ago.

Download all attachments as: .zip

Change History (8)

#1 @Rarst
13 months ago

  • Keywords has-patch added

#2 @pento
13 months ago

  • Version changed from trunk to 4.4

#3 @SergeyBiryukov
6 months ago

  • Milestone changed from Awaiting Review to 5.0
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#4 @SergeyBiryukov
6 months ago

Introduced in [34846].

#5 @SergeyBiryukov
6 months ago

In 43383:

Docs: Correct description for mysql_to_rfc3339().

Despite historical function name, the output does not conform to RFC3339 format, which must contain timezone.

Props Rarst.
See #42542.

#6 @SergeyBiryukov
6 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 43384:

Date/Time: Simplify mysql_to_rfc3339().

Erasing timezone with a regular expression is redundant, the date could be just formatted in the respective format instead.

Props Rarst.
Fixes #42542.

#7 @johnbillion
2 months ago

  • Milestone changed from 5.0 to 5.1
Note: See TracTickets for help on using tickets.