WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#16495 new defect (bug)

Make iso8601_to_datetime a bit more compliant

Reported by: chrisscott Owned by:
Priority: normal Milestone: Awaiting Review
Component: Formatting Version: 3.0.5
Severity: normal Keywords: has-patch
Cc:

Description

With a valid ISO 8601 date string with dashes in the date or decimal fractions for seconds, this function will fail to parse it correctly. The attached patch updates the regex to optionally accept dashes and decimal fractions for seconds (which are ignored). It also uses a variable for the regex since it was duplicated.

Attachments (1)

formatting.php.patch (1.1 KB) - added by chrisscott 2 years ago.

Download all attachments as: .zip

Change History (2)

chrisscott2 years ago

comment:1 solarissmoke2 years ago

  • Component changed from General to Formatting
  • Keywords has-patch added
Note: See TracTickets for help on using tickets.