Make WordPress Core

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#42542 closed enhancement (fixed)

Simplify mysql_to_rfc3339() and document RFC3339 incompatibility

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


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

Download all attachments as: .zip

Change History (8)

#1 @Rarst
7 years ago

  • Keywords has-patch added

#2 @pento
7 years ago

  • Version changed from trunk to 4.4

#3 @SergeyBiryukov
6 years ago

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

#4 @SergeyBiryukov
6 years ago

Introduced in [34846].

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

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