Ticket #20942: gmt-date-matches.diff
File gmt-date-matches.diff, 537 bytes (added by , 13 years ago) |
---|
-
wp-includes/formatting.php
1865 1865 */ 1866 1866 function get_gmt_from_date($string, $format = 'Y-m-d H:i:s') { 1867 1867 preg_match('#([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#', $string, $matches); 1868 1869 if ( ! $matches ) 1870 return null; 1871 1868 1872 $tz = get_option('timezone_string'); 1869 1873 if ( $tz ) { 1870 1874 date_default_timezone_set( $tz );