Make WordPress Core


Ignore:
Timestamp:
06/26/2018 05:52:58 PM (7 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r43380 r43383  
    58505850
    58515851/**
    5852  * Parses and formats a MySQL datetime (Y-m-d H:i:s) for ISO8601/RFC3339.
     5852 * Parses and formats a MySQL datetime (Y-m-d H:i:s) for ISO8601 (Y-m-d\TH:i:s).
    58535853 *
    58545854 * Explicitly strips timezones, as datetimes are not saved with any timezone
    58555855 * information. Including any information on the offset could be misleading.
    58565856 *
     5857 * Despite historical function name, the output does not conform to RFC3339 format,
     5858 * which must contain timezone.
     5859 *
    58575860 * @since 4.4.0
    58585861 *
    58595862 * @param string $date_string Date string to parse and format.
    5860  * @return string Date formatted for ISO8601/RFC3339.
     5863 * @return string Date formatted for ISO8601 without time zone.
    58615864 */
    58625865function mysql_to_rfc3339( $date_string ) {
Note: See TracChangeset for help on using the changeset viewer.