WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 3 years ago

Last modified 3 years 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 4 years ago.

Download all attachments as: .zip

Change History (8)

#1 @Rarst
4 years ago

  • Keywords has-patch added

#2 @pento
4 years ago

  • Version changed from trunk to 4.4

#3 @SergeyBiryukov
3 years ago

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

#4 @SergeyBiryukov
3 years ago

Introduced in [34846].

#5 @SergeyBiryukov
3 years 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
3 years 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
3 years ago

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