函数原型
mysql_to_rfc3339( string $date_string ): string
函数描述
Parses and formats a MySQL datetime (Y-m-d H:i:s) for ISO8601 (Y-m-d\TH:i:s).
是否弃用
未弃用
函数参数
-
$date_string
string
Required - Date string to parse and format.
函数返回值
string Date formatted for ISO8601 without time zone.
函数位置
File: wp-includes/functions.php.
函数源码
function mysql_to_rfc3339( $date_string ) {
return mysql2date( 'Y-m-d\TH:i:s', $date_string, false );
}
源码链接
变更日志
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |

