| 734 | | 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); |
| 735 | | $string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]); |
| 736 | | $string_gmt = gmdate('Y-m-d H:i:s', $string_time - get_option('gmt_offset') * 3600); |
| 737 | | return $string_gmt; |
| | 734 | global $wpdb; |
| | 735 | $offset = get_option('gmt_offset'); |
| | 736 | $result = $wpdb->get_results("select '$string' - INTERVAL $offset HOUR as r;"); |
| | 737 | return $result[0]->r; |
| 743 | | 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); |
| 744 | | $string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]); |
| 745 | | $string_localtime = gmdate('Y-m-d H:i:s', $string_time + get_option('gmt_offset')*3600); |
| 746 | | return $string_localtime; |
| | 743 | global $wpdb; |
| | 744 | global $wpdb; |
| | 745 | $offset = get_option('gmt_offset'); |
| | 746 | $result = $wpdb->get_results("select '$string' + INTERVAL $offset HOUR as r;"); |
| | 747 | return $result[0]->r; |