-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
317 | 317 | $_year = $date_query['year']; |
318 | 318 | } |
319 | 319 | |
320 | | $max_days_of_year = date( 'z', mktime( 0, 0, 0, 12, 31, $_year ) ) + 1; |
| 320 | $max_days_of_year = gmdate( 'z', mktime( 0, 0, 0, 12, 31, $_year ) ) + 1; |
321 | 321 | } else { |
322 | 322 | // otherwise we use the max of 366 (leap-year) |
323 | 323 | $max_days_of_year = 366; |
… |
… |
|
352 | 352 | * If we have a specific year, use it to calculate number of weeks. |
353 | 353 | * Note: the number of weeks in a year is the date in which Dec 28 appears. |
354 | 354 | */ |
355 | | $week_count = date( 'W', mktime( 0, 0, 0, 12, 28, $_year ) ); |
| 355 | $week_count = gmdate( 'W', mktime( 0, 0, 0, 12, 28, $_year ) ); |
356 | 356 | |
357 | 357 | } else { |
358 | 358 | // Otherwise set the week-count to a maximum of 53. |
… |
… |
|
923 | 923 | } |
924 | 924 | |
925 | 925 | if ( ! isset( $datetime['day'] ) ) { |
926 | | $datetime['day'] = ( $default_to_max ) ? (int) date( 't', mktime( 0, 0, 0, $datetime['month'], 1, $datetime['year'] ) ) : 1; |
| 926 | $datetime['day'] = ( $default_to_max ) ? (int) gmdate( 't', mktime( 0, 0, 0, $datetime['month'], 1, $datetime['year'] ) ) : 1; |
927 | 927 | } |
928 | 928 | |
929 | 929 | if ( ! isset( $datetime['hour'] ) ) { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
443 | 443 | } |
444 | 444 | |
445 | 445 | if ( ! $wp_last_modified ) { |
446 | | $wp_last_modified = date( 'D, d M Y H:i:s' ); |
| 446 | $wp_last_modified = gmdate( 'D, d M Y H:i:s' ); |
447 | 447 | } |
448 | 448 | |
449 | 449 | $wp_last_modified .= ' GMT'; |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
863 | 863 | $posts->the_post(); |
864 | 864 | |
865 | 865 | $time = get_the_time( 'U' ); |
866 | | if ( date( 'Y-m-d', $time ) == $today ) { |
| 866 | if ( gmdate( 'Y-m-d', $time ) == $today ) { |
867 | 867 | $relative = __( 'Today' ); |
868 | | } elseif ( date( 'Y-m-d', $time ) == $tomorrow ) { |
| 868 | } elseif ( gmdate( 'Y-m-d', $time ) == $tomorrow ) { |
869 | 869 | $relative = __( 'Tomorrow' ); |
870 | | } elseif ( date( 'Y', $time ) !== $year ) { |
| 870 | } elseif ( gmdate( 'Y', $time ) !== $year ) { |
871 | 871 | /* translators: date and time format for recent posts on the dashboard, from a different calendar year, see https://secure.php.net/date */ |
872 | 872 | $relative = date_i18n( __( 'M jS Y' ), $time ); |
873 | 873 | } else { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
3273 | 3273 | // Set the time zone to whatever the default is to avoid 500 errors |
3274 | 3274 | // Will default to UTC if it's not set properly in php.ini |
3275 | 3275 | date_default_timezone_set(@date_default_timezone_get()); |
3276 | | return date('D, j M Y H:i:s O'); |
| 3276 | return gmdate('D, j M Y H:i:s O'); |
3277 | 3277 | } |
3278 | 3278 | |
3279 | 3279 | /** |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
49 | 49 | public static function wpSetupBeforeClass() { |
50 | 50 | self::$time = time(); |
51 | 51 | |
52 | | $post_date = date( 'Y-m-d H:i:s', self::$time ); |
| 52 | $post_date = gmdate( 'Y-m-d H:i:s', self::$time ); |
53 | 53 | |
54 | 54 | self::$parent_1 = self::factory()->post->create( |
55 | 55 | array( |
… |
… |
|
157 | 157 | 'depth' => 1, |
158 | 158 | 'show_date' => true, |
159 | 159 | ); |
160 | | $date = date( get_option( 'date_format' ), self::$time ); |
| 160 | $date = gmdate( get_option( 'date_format' ), self::$time ); |
161 | 161 | |
162 | 162 | $expected = '<li class="pagenav">Pages<ul><li class="page_item page-item-' . self::$parent_1 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_1 ) . '">Parent 1</a> ' . $date . '</li> |
163 | 163 | <li class="page_item page-item-' . self::$parent_2 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_2 ) . '">Parent 2</a> ' . $date . '</li> |
… |
… |
|
173 | 173 | 'show_date' => true, |
174 | 174 | 'date_format' => 'l, F j, Y', |
175 | 175 | ); |
176 | | $date = date( $args['date_format'], self::$time ); |
| 176 | $date = gmdate( $args['date_format'], self::$time ); |
177 | 177 | |
178 | 178 | $expected = '<li class="pagenav">Pages<ul><li class="page_item page-item-' . self::$parent_1 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_1 ) . '">Parent 1</a> ' . $date . ' |
179 | 179 | <ul class=\'children\'> |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
336 | 336 | |
337 | 337 | public function test_get_adjacent_post() { |
338 | 338 | $now = time(); |
339 | | $post_id = self::factory()->post->create( array( 'post_date' => date( 'Y-m-d H:i:s', $now - 1 ) ) ); |
340 | | $post_id2 = self::factory()->post->create( array( 'post_date' => date( 'Y-m-d H:i:s', $now ) ) ); |
| 339 | $post_id = self::factory()->post->create( array( 'post_date' => gmdate( 'Y-m-d H:i:s', $now - 1 ) ) ); |
| 340 | $post_id2 = self::factory()->post->create( array( 'post_date' => gmdate( 'Y-m-d H:i:s', $now ) ) ); |
341 | 341 | |
342 | 342 | if ( ! isset( $GLOBALS['post'] ) ) { |
343 | 343 | $GLOBALS['post'] = null; |
… |
… |
|
379 | 379 | array( |
380 | 380 | 'post_author' => $u, |
381 | 381 | 'post_status' => 'private', |
382 | | 'post_date' => date( 'Y-m-d H:i:s', $now - 1 ), |
| 382 | 'post_date' => gmdate( 'Y-m-d H:i:s', $now - 1 ), |
383 | 383 | ) |
384 | 384 | ); |
385 | 385 | $p2 = self::factory()->post->create( |
386 | 386 | array( |
387 | 387 | 'post_author' => $u, |
388 | | 'post_date' => date( 'Y-m-d H:i:s', $now ), |
| 388 | 'post_date' => gmdate( 'Y-m-d H:i:s', $now ), |
389 | 389 | ) |
390 | 390 | ); |
391 | 391 | |
… |
… |
|
417 | 417 | array( |
418 | 418 | 'post_author' => $u1, |
419 | 419 | 'post_status' => 'private', |
420 | | 'post_date' => date( 'Y-m-d H:i:s', $now - 1 ), |
| 420 | 'post_date' => gmdate( 'Y-m-d H:i:s', $now - 1 ), |
421 | 421 | ) |
422 | 422 | ); |
423 | 423 | $p2 = self::factory()->post->create( |
424 | 424 | array( |
425 | 425 | 'post_author' => $u1, |
426 | | 'post_date' => date( 'Y-m-d H:i:s', $now ), |
| 426 | 'post_date' => gmdate( 'Y-m-d H:i:s', $now ), |
427 | 427 | ) |
428 | 428 | ); |
429 | 429 | |
… |
… |
|
454 | 454 | $p1 = self::factory()->post->create( |
455 | 455 | array( |
456 | 456 | 'post_author' => $u1, |
457 | | 'post_date' => date( 'Y-m-d H:i:s', $now - 2 ), |
| 457 | 'post_date' => gmdate( 'Y-m-d H:i:s', $now - 2 ), |
458 | 458 | ) |
459 | 459 | ); |
460 | 460 | $p2 = self::factory()->post->create( |
461 | 461 | array( |
462 | 462 | 'post_author' => $u1, |
463 | 463 | 'post_status' => 'private', |
464 | | 'post_date' => date( 'Y-m-d H:i:s', $now - 1 ), |
| 464 | 'post_date' => gmdate( 'Y-m-d H:i:s', $now - 1 ), |
465 | 465 | ) |
466 | 466 | ); |
467 | 467 | $p3 = self::factory()->post->create( |
468 | 468 | array( |
469 | 469 | 'post_author' => $u1, |
470 | | 'post_date' => date( 'Y-m-d H:i:s', $now ), |
| 470 | 'post_date' => gmdate( 'Y-m-d H:i:s', $now ), |
471 | 471 | ) |
472 | 472 | ); |
473 | 473 | |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
41 | 41 | if ( $translate ) { |
42 | 42 | return date_i18n( $format, $i ); |
43 | 43 | } else { |
44 | | return date( $format, $i ); |
| 44 | return gmdate( $format, $i ); |
45 | 45 | } |
46 | 46 | } |
47 | 47 | |
… |
… |
|
111 | 111 | $dateformatstring = preg_replace( '/(?<!\\\\)r/', DATE_RFC2822, $dateformatstring ); |
112 | 112 | |
113 | 113 | if ( ( ! empty( $wp_locale->month ) ) && ( ! empty( $wp_locale->weekday ) ) ) { |
114 | | $datemonth = $wp_locale->get_month( date( 'm', $i ) ); |
| 114 | $datemonth = $wp_locale->get_month( gmdate( 'm', $i ) ); |
115 | 115 | $datemonth_abbrev = $wp_locale->get_month_abbrev( $datemonth ); |
116 | | $dateweekday = $wp_locale->get_weekday( date( 'w', $i ) ); |
| 116 | $dateweekday = $wp_locale->get_weekday( gmdate( 'w', $i ) ); |
117 | 117 | $dateweekday_abbrev = $wp_locale->get_weekday_abbrev( $dateweekday ); |
118 | | $datemeridiem = $wp_locale->get_meridiem( date( 'a', $i ) ); |
119 | | $datemeridiem_capital = $wp_locale->get_meridiem( date( 'A', $i ) ); |
| 118 | $datemeridiem = $wp_locale->get_meridiem( gmdate( 'a', $i ) ); |
| 119 | $datemeridiem_capital = $wp_locale->get_meridiem( gmdate( 'A', $i ) ); |
120 | 120 | $dateformatstring = ' ' . $dateformatstring; |
121 | 121 | $dateformatstring = preg_replace( '/([^\\\])D/', "\\1" . backslashit( $dateweekday_abbrev ), $dateformatstring ); |
122 | 122 | $dateformatstring = preg_replace( '/([^\\\])F/', "\\1" . backslashit( $datemonth ), $dateformatstring ); |
… |
… |
|
177 | 177 | } |
178 | 178 | } |
179 | 179 | } |
180 | | $j = @date( $dateformatstring, $i ); |
| 180 | $j = @gmdate( $dateformatstring, $i ); |
181 | 181 | |
182 | 182 | /** |
183 | 183 | * Filters the date formatted based on the locale. |
… |
… |
|
415 | 415 | $day = mktime( 0, 0, 0, $md, $mm, $my ); |
416 | 416 | |
417 | 417 | // The day of the week from the timestamp. |
418 | | $weekday = date( 'w', $day ); |
| 418 | $weekday = gmdate( 'w', $day ); |
419 | 419 | |
420 | 420 | if ( ! is_numeric( $start_of_week ) ) { |
421 | 421 | $start_of_week = get_option( 'start_of_week' ); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
6 | 6 | */ |
7 | 7 | class Tests_Date_I18n extends WP_UnitTestCase { |
8 | 8 | public function test_should_format_date() { |
9 | | $this->assertEquals( strtotime( date( 'Y-m-d H:i:s' ) ), strtotime( date_i18n( 'Y-m-d H:i:s' ) ), 'The dates should be equal', 2 ); |
| 9 | $this->assertEquals( strtotime( gmdate( 'Y-m-d H:i:s' ) ), strtotime( date_i18n( 'Y-m-d H:i:s' ) ), 'The dates should be equal', 2 ); |
10 | 10 | } |
11 | 11 | |
12 | 12 | public function test_should_use_custom_timestamp() { |
… |
… |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | public function test_date_should_be_in_gmt() { |
17 | | $this->assertEquals( strtotime( date( DATE_RFC3339 ) ), strtotime( date_i18n( DATE_RFC3339, false, true ) ), 'The dates should be equal', 2 ); |
| 17 | $this->assertEquals( strtotime( gmdate( DATE_RFC3339 ) ), strtotime( date_i18n( DATE_RFC3339, false, true ) ), 'The dates should be equal', 2 ); |
18 | 18 | } |
19 | 19 | |
20 | 20 | public function test_custom_timestamp_ignores_gmt_setting() { |
… |
… |
|
24 | 24 | public function test_custom_timezone_setting() { |
25 | 25 | update_option( 'timezone_string', 'America/Regina' ); |
26 | 26 | |
27 | | $this->assertEquals( strtotime( date( 'Y-m-d H:i:s', time() + get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ), strtotime( date_i18n( 'Y-m-d H:i:s' ) ), 'The dates should be equal', 2 ); |
| 27 | $this->assertEquals( strtotime( gmdate( 'Y-m-d H:i:s', time() + get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ), strtotime( date_i18n( 'Y-m-d H:i:s' ) ), 'The dates should be equal', 2 ); |
28 | 28 | } |
29 | 29 | |
30 | 30 | public function test_date_should_be_in_gmt_with_custom_timezone_setting() { |
31 | 31 | update_option( 'timezone_string', 'America/Regina' ); |
32 | 32 | |
33 | | $this->assertEquals( strtotime( date( DATE_RFC3339 ) ), strtotime( date_i18n( DATE_RFC3339, false, true ) ), 'The dates should be equal', 2 ); |
| 33 | $this->assertEquals( strtotime( gmdate( DATE_RFC3339 ) ), strtotime( date_i18n( DATE_RFC3339, false, true ) ), 'The dates should be equal', 2 ); |
34 | 34 | } |
35 | 35 | |
36 | 36 | public function test_date_should_be_in_gmt_with_custom_timezone_setting_and_timestamp() { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
532 | 532 | $now = time(); |
533 | 533 | for ( $j = 1; $j < 3; $j++ ) { |
534 | 534 | // Manually modify dates to ensure they're different. |
535 | | $date = date( 'Y-m-d H:i:s', $now - ( $j * 10 ) ); |
| 535 | $date = gmdate( 'Y-m-d H:i:s', $now - ( $j * 10 ) ); |
536 | 536 | $post_revision_fields['post_date'] = $date; |
537 | 537 | $post_revision_fields['post_date_gmt'] = $date; |
538 | 538 | |
… |
… |
|
563 | 563 | $post_revision_fields = wp_slash( $post_revision_fields ); |
564 | 564 | |
565 | 565 | $revision_ids = array(); |
566 | | $date = date( 'Y-m-d H:i:s', time() - 10 ); |
| 566 | $date = gmdate( 'Y-m-d H:i:s', time() - 10 ); |
567 | 567 | for ( $j = 1; $j < 3; $j++ ) { |
568 | 568 | // Manually modify dates to ensure they're the same. |
569 | 569 | $post_revision_fields['post_date'] = $date; |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
151 | 151 | header('Content-Type: text/xml; charset='.$charset); |
152 | 152 | else |
153 | 153 | header('Content-Type: text/xml'); |
154 | | header('Date: '.date('r')); |
| 154 | header('Date: '.gmdate('r')); |
155 | 155 | echo $xml; |
156 | 156 | exit; |
157 | 157 | } |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
337 | 337 | $comment_modified_date = $wpdb->get_var( "SELECT comment_date FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1" ); |
338 | 338 | break; |
339 | 339 | case 'server': |
340 | | $add_seconds_server = date( 'Z' ); |
| 340 | $add_seconds_server = gmdate( 'Z' ); |
341 | 341 | |
342 | 342 | $comment_modified_date = $wpdb->get_var( $wpdb->prepare( "SELECT DATE_ADD(comment_date_gmt, INTERVAL %s SECOND) FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1", $add_seconds_server ) ); |
343 | 343 | break; |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
37 | 37 | |
38 | 38 | function parseTimestamp($timestamp) |
39 | 39 | { |
40 | | $this->year = date('Y', $timestamp); |
41 | | $this->month = date('m', $timestamp); |
42 | | $this->day = date('d', $timestamp); |
43 | | $this->hour = date('H', $timestamp); |
44 | | $this->minute = date('i', $timestamp); |
45 | | $this->second = date('s', $timestamp); |
| 40 | $this->year = gmdate('Y', $timestamp); |
| 41 | $this->month = gmdate('m', $timestamp); |
| 42 | $this->day = gmdate('d', $timestamp); |
| 43 | $this->hour = gmdate('H', $timestamp); |
| 44 | $this->minute = gmdate('i', $timestamp); |
| 45 | $this->second = gmdate('s', $timestamp); |
46 | 46 | $this->timezone = ''; |
47 | 47 | } |
48 | 48 | |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
13 | 13 | |
14 | 14 | $license = file_get_contents( ABSPATH . 'license.txt' ); |
15 | 15 | preg_match( '#Copyright 2011-(\d+) by the contributors#', $license, $matches ); |
16 | | $this_year = date( 'Y' ); |
| 16 | $this_year = gmdate( 'Y' ); |
17 | 17 | $this->assertEquals( $this_year, trim( $matches[1] ), "license.txt's year needs to be updated to $this_year." ); |
18 | 18 | } |
19 | 19 | |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
133 | 133 | |
134 | 134 | $post = self::factory()->post->create_and_get( |
135 | 135 | array( |
136 | | 'post_date' => date( 'Y-m-d H:i:s', strtotime( '+1 day' ) ), |
| 136 | 'post_date' => gmdate( 'Y-m-d H:i:s', strtotime( '+1 day' ) ), |
137 | 137 | ) |
138 | 138 | ); |
139 | 139 | |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
12 | 12 | // Set post times to get a reliable order. |
13 | 13 | $now = time(); |
14 | 14 | for ( $i = 0; $i <= 22; $i++ ) { |
15 | | $post_date = date( 'Y-m-d H:i:s', $now - ( 10 * $i ) ); |
| 15 | $post_date = gmdate( 'Y-m-d H:i:s', $now - ( 10 * $i ) ); |
16 | 16 | self::$posts[ $i ] = $factory->post->create( |
17 | 17 | array( |
18 | 18 | 'post_date' => $post_date, |
… |
… |
|
28 | 28 | public function test_stickies_should_be_ignored_when_is_home_is_false() { |
29 | 29 | $q = new WP_Query( |
30 | 30 | array( |
31 | | 'year' => date( 'Y' ), |
| 31 | 'year' => gmdate( 'Y' ), |
32 | 32 | 'fields' => 'ids', |
33 | 33 | 'posts_per_page' => 3, |
34 | 34 | ) |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
202 | 202 | </tr> |
203 | 203 | <tr> |
204 | 204 | <th><label><input name="selection" type="radio" value="<?php echo esc_attr( $structures[1] ); ?>" <?php checked( $structures[1], $permalink_structure ); ?> /> <?php _e( 'Day and name' ); ?></label></th> |
205 | | <td><code><?php echo get_option( 'home' ) . $blog_prefix . $prefix . '/' . date( 'Y' ) . '/' . date( 'm' ) . '/' . date( 'd' ) . '/' . _x( 'sample-post', 'sample permalink structure' ) . '/'; ?></code></td> |
| 205 | <td><code><?php echo get_option( 'home' ) . $blog_prefix . $prefix . '/' . gmdate( 'Y' ) . '/' . gmdate( 'm' ) . '/' . gmdate( 'd' ) . '/' . _x( 'sample-post', 'sample permalink structure' ) . '/'; ?></code></td> |
206 | 206 | </tr> |
207 | 207 | <tr> |
208 | 208 | <th><label><input name="selection" type="radio" value="<?php echo esc_attr( $structures[2] ); ?>" <?php checked( $structures[2], $permalink_structure ); ?> /> <?php _e( 'Month and name' ); ?></label></th> |
209 | | <td><code><?php echo get_option( 'home' ) . $blog_prefix . $prefix . '/' . date( 'Y' ) . '/' . date( 'm' ) . '/' . _x( 'sample-post', 'sample permalink structure' ) . '/'; ?></code></td> |
| 209 | <td><code><?php echo get_option( 'home' ) . $blog_prefix . $prefix . '/' . gmdate( 'Y' ) . '/' . gmdate( 'm' ) . '/' . _x( 'sample-post', 'sample permalink structure' ) . '/'; ?></code></td> |
210 | 210 | </tr> |
211 | 211 | <tr> |
212 | 212 | <th><label><input name="selection" type="radio" value="<?php echo esc_attr( $structures[3] ); ?>" <?php checked( $structures[3], $permalink_structure ); ?> /> <?php _e( 'Numeric' ); ?></label></th> |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
6020 | 6020 | * @param WP_Post $post_before The Previous Post Object |
6021 | 6021 | */ |
6022 | 6022 | function wp_check_for_changed_dates( $post_id, $post, $post_before ) { |
6023 | | $previous_date = date( 'Y-m-d', strtotime( $post_before->post_date ) ); |
6024 | | $new_date = date( 'Y-m-d', strtotime( $post->post_date ) ); |
| 6023 | $previous_date = gmdate( 'Y-m-d', strtotime( $post_before->post_date ) ); |
| 6024 | $new_date = gmdate( 'Y-m-d', strtotime( $post->post_date ) ); |
6025 | 6025 | // Don't bother if it hasn't changed. |
6026 | 6026 | if ( $new_date == $previous_date ) { |
6027 | 6027 | return; |
… |
… |
|
6275 | 6275 | $date = $wpdb->get_var( "SELECT post_{$field} FROM $wpdb->posts WHERE post_status = 'publish' AND post_type IN ({$post_types}) ORDER BY post_{$field}_gmt DESC LIMIT 1" ); |
6276 | 6276 | break; |
6277 | 6277 | case 'server': |
6278 | | $add_seconds_server = date( 'Z' ); |
| 6278 | $add_seconds_server = gmdate( 'Z' ); |
6279 | 6279 | $date = $wpdb->get_var( "SELECT DATE_ADD(post_{$field}_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type IN ({$post_types}) ORDER BY post_{$field}_gmt DESC LIMIT 1" ); |
6280 | 6280 | break; |
6281 | 6281 | } |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
17 | 17 | array( |
18 | 18 | 'comment_post_ID' => $p, |
19 | 19 | 'comment_content' => '1', |
20 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 100 ), |
| 20 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 100 ), |
21 | 21 | ) |
22 | 22 | ); |
23 | 23 | $comment_2 = self::factory()->comment->create( |
24 | 24 | array( |
25 | 25 | 'comment_post_ID' => $p, |
26 | 26 | 'comment_content' => '2', |
27 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 200 ), |
| 27 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 200 ), |
28 | 28 | ) |
29 | 29 | ); |
30 | 30 | |
… |
… |
|
51 | 51 | array( |
52 | 52 | 'comment_post_ID' => $p, |
53 | 53 | 'comment_content' => '1', |
54 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 100 ), |
| 54 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 100 ), |
55 | 55 | ) |
56 | 56 | ); |
57 | 57 | $comment_2 = self::factory()->comment->create( |
58 | 58 | array( |
59 | 59 | 'comment_post_ID' => $p, |
60 | 60 | 'comment_content' => '2', |
61 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 200 ), |
| 61 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 200 ), |
62 | 62 | ) |
63 | 63 | ); |
64 | 64 | |
… |
… |
|
85 | 85 | array( |
86 | 86 | 'comment_post_ID' => $p, |
87 | 87 | 'comment_content' => '1', |
88 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 100 ), |
| 88 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 100 ), |
89 | 89 | ) |
90 | 90 | ); |
91 | 91 | $comment_2 = self::factory()->comment->create( |
92 | 92 | array( |
93 | 93 | 'comment_post_ID' => $p, |
94 | 94 | 'comment_content' => '2', |
95 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 200 ), |
| 95 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 200 ), |
96 | 96 | ) |
97 | 97 | ); |
98 | 98 | |
… |
… |
|
119 | 119 | array( |
120 | 120 | 'comment_post_ID' => $p, |
121 | 121 | 'comment_content' => '1', |
122 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 100 ), |
| 122 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 100 ), |
123 | 123 | ) |
124 | 124 | ); |
125 | 125 | $comment_2 = self::factory()->comment->create( |
126 | 126 | array( |
127 | 127 | 'comment_post_ID' => $p, |
128 | 128 | 'comment_content' => '2', |
129 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 200 ), |
| 129 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 200 ), |
130 | 130 | ) |
131 | 131 | ); |
132 | 132 | |
… |
… |
|
153 | 153 | array( |
154 | 154 | 'comment_post_ID' => $p, |
155 | 155 | 'comment_content' => '1', |
156 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 100 ), |
| 156 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 100 ), |
157 | 157 | ) |
158 | 158 | ); |
159 | 159 | $comment_2 = self::factory()->comment->create( |
160 | 160 | array( |
161 | 161 | 'comment_post_ID' => $p, |
162 | 162 | 'comment_content' => '2', |
163 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 200 ), |
| 163 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 200 ), |
164 | 164 | ) |
165 | 165 | ); |
166 | 166 | $comment_3 = self::factory()->comment->create( |
167 | 167 | array( |
168 | 168 | 'comment_post_ID' => $p, |
169 | 169 | 'comment_content' => '3', |
170 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 300 ), |
| 170 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 300 ), |
171 | 171 | ) |
172 | 172 | ); |
173 | 173 | $comment_4 = self::factory()->comment->create( |
174 | 174 | array( |
175 | 175 | 'comment_post_ID' => $p, |
176 | 176 | 'comment_content' => '4', |
177 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 400 ), |
| 177 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 400 ), |
178 | 178 | ) |
179 | 179 | ); |
180 | 180 | $comment_5 = self::factory()->comment->create( |
181 | 181 | array( |
182 | 182 | 'comment_post_ID' => $p, |
183 | 183 | 'comment_content' => '3', |
184 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 500 ), |
| 184 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 500 ), |
185 | 185 | ) |
186 | 186 | ); |
187 | 187 | $comment_6 = self::factory()->comment->create( |
188 | 188 | array( |
189 | 189 | 'comment_post_ID' => $p, |
190 | 190 | 'comment_content' => '4', |
191 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 600 ), |
| 191 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 600 ), |
192 | 192 | ) |
193 | 193 | ); |
194 | 194 | |
… |
… |
|
224 | 224 | array( |
225 | 225 | 'comment_post_ID' => $p, |
226 | 226 | 'comment_content' => '1', |
227 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 100 ), |
| 227 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 100 ), |
228 | 228 | ) |
229 | 229 | ); |
230 | 230 | $comment_2 = self::factory()->comment->create( |
231 | 231 | array( |
232 | 232 | 'comment_post_ID' => $p, |
233 | 233 | 'comment_content' => '2', |
234 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 200 ), |
| 234 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 200 ), |
235 | 235 | ) |
236 | 236 | ); |
237 | 237 | $comment_3 = self::factory()->comment->create( |
238 | 238 | array( |
239 | 239 | 'comment_post_ID' => $p, |
240 | 240 | 'comment_content' => '3', |
241 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 300 ), |
| 241 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 300 ), |
242 | 242 | ) |
243 | 243 | ); |
244 | 244 | $comment_4 = self::factory()->comment->create( |
245 | 245 | array( |
246 | 246 | 'comment_post_ID' => $p, |
247 | 247 | 'comment_content' => '4', |
248 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 400 ), |
| 248 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 400 ), |
249 | 249 | ) |
250 | 250 | ); |
251 | 251 | $comment_5 = self::factory()->comment->create( |
252 | 252 | array( |
253 | 253 | 'comment_post_ID' => $p, |
254 | 254 | 'comment_content' => '3', |
255 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 500 ), |
| 255 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 500 ), |
256 | 256 | ) |
257 | 257 | ); |
258 | 258 | $comment_6 = self::factory()->comment->create( |
259 | 259 | array( |
260 | 260 | 'comment_post_ID' => $p, |
261 | 261 | 'comment_content' => '4', |
262 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 600 ), |
| 262 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 600 ), |
263 | 263 | ) |
264 | 264 | ); |
265 | 265 | |
… |
… |
|
295 | 295 | array( |
296 | 296 | 'comment_post_ID' => $p, |
297 | 297 | 'comment_content' => '1', |
298 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 100 ), |
| 298 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 100 ), |
299 | 299 | ) |
300 | 300 | ); |
301 | 301 | $comment_2 = self::factory()->comment->create( |
302 | 302 | array( |
303 | 303 | 'comment_post_ID' => $p, |
304 | 304 | 'comment_content' => '2', |
305 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 200 ), |
| 305 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 200 ), |
306 | 306 | ) |
307 | 307 | ); |
308 | 308 | $comment_3 = self::factory()->comment->create( |
309 | 309 | array( |
310 | 310 | 'comment_post_ID' => $p, |
311 | 311 | 'comment_content' => '3', |
312 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 300 ), |
| 312 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 300 ), |
313 | 313 | ) |
314 | 314 | ); |
315 | 315 | $comment_4 = self::factory()->comment->create( |
316 | 316 | array( |
317 | 317 | 'comment_post_ID' => $p, |
318 | 318 | 'comment_content' => '4', |
319 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 400 ), |
| 319 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 400 ), |
320 | 320 | ) |
321 | 321 | ); |
322 | 322 | |
… |
… |
|
352 | 352 | array( |
353 | 353 | 'comment_post_ID' => $p, |
354 | 354 | 'comment_content' => '1', |
355 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 100 ), |
| 355 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 100 ), |
356 | 356 | ) |
357 | 357 | ); |
358 | 358 | $comment_2 = self::factory()->comment->create( |
359 | 359 | array( |
360 | 360 | 'comment_post_ID' => $p, |
361 | 361 | 'comment_content' => '2', |
362 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 200 ), |
| 362 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 200 ), |
363 | 363 | ) |
364 | 364 | ); |
365 | 365 | $comment_3 = self::factory()->comment->create( |
366 | 366 | array( |
367 | 367 | 'comment_post_ID' => $p, |
368 | 368 | 'comment_content' => '3', |
369 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 300 ), |
| 369 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 300 ), |
370 | 370 | ) |
371 | 371 | ); |
372 | 372 | $comment_4 = self::factory()->comment->create( |
373 | 373 | array( |
374 | 374 | 'comment_post_ID' => $p, |
375 | 375 | 'comment_content' => '4', |
376 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 400 ), |
| 376 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 400 ), |
377 | 377 | ) |
378 | 378 | ); |
379 | 379 | |
… |
… |
|
411 | 411 | array( |
412 | 412 | 'comment_post_ID' => $p, |
413 | 413 | 'comment_content' => '1', |
414 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 100 ), |
| 414 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 100 ), |
415 | 415 | ) |
416 | 416 | ); |
417 | 417 | $comment_2 = self::factory()->comment->create( |
418 | 418 | array( |
419 | 419 | 'comment_post_ID' => $p, |
420 | 420 | 'comment_content' => '2', |
421 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 200 ), |
| 421 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 200 ), |
422 | 422 | ) |
423 | 423 | ); |
424 | 424 | $comment_3 = self::factory()->comment->create( |
425 | 425 | array( |
426 | 426 | 'comment_post_ID' => $p, |
427 | 427 | 'comment_content' => '3', |
428 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 300 ), |
| 428 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 300 ), |
429 | 429 | ) |
430 | 430 | ); |
431 | 431 | |
… |
… |
|
463 | 463 | array( |
464 | 464 | 'comment_post_ID' => $p, |
465 | 465 | 'comment_content' => '1', |
466 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 100 ), |
| 466 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 100 ), |
467 | 467 | ) |
468 | 468 | ); |
469 | 469 | $comment_2 = self::factory()->comment->create( |
470 | 470 | array( |
471 | 471 | 'comment_post_ID' => $p, |
472 | 472 | 'comment_content' => '2', |
473 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 200 ), |
| 473 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 200 ), |
474 | 474 | ) |
475 | 475 | ); |
476 | 476 | $comment_3 = self::factory()->comment->create( |
477 | 477 | array( |
478 | 478 | 'comment_post_ID' => $p, |
479 | 479 | 'comment_content' => '3', |
480 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 300 ), |
| 480 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 300 ), |
481 | 481 | ) |
482 | 482 | ); |
483 | 483 | |
… |
… |
|
513 | 513 | array( |
514 | 514 | 'comment_post_ID' => $p, |
515 | 515 | 'comment_content' => '1', |
516 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 100 ), |
| 516 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 100 ), |
517 | 517 | ) |
518 | 518 | ); |
519 | 519 | $comment_2 = self::factory()->comment->create( |
520 | 520 | array( |
521 | 521 | 'comment_post_ID' => $p, |
522 | 522 | 'comment_content' => '2', |
523 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 200 ), |
| 523 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 200 ), |
524 | 524 | ) |
525 | 525 | ); |
526 | 526 | $comment_3 = self::factory()->comment->create( |
527 | 527 | array( |
528 | 528 | 'comment_post_ID' => $p, |
529 | 529 | 'comment_content' => '3', |
530 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 300 ), |
| 530 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 300 ), |
531 | 531 | ) |
532 | 532 | ); |
533 | 533 | $comment_4 = self::factory()->comment->create( |
534 | 534 | array( |
535 | 535 | 'comment_post_ID' => $p, |
536 | 536 | 'comment_content' => '4', |
537 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 400 ), |
| 537 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 400 ), |
538 | 538 | ) |
539 | 539 | ); |
540 | 540 | |
… |
… |
|
592 | 592 | array( |
593 | 593 | 'comment_post_ID' => $p, |
594 | 594 | 'comment_content' => '1', |
595 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 100 ), |
| 595 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 100 ), |
596 | 596 | ) |
597 | 597 | ); |
598 | 598 | $comment_2 = self::factory()->comment->create( |
599 | 599 | array( |
600 | 600 | 'comment_post_ID' => $p, |
601 | 601 | 'comment_content' => '2', |
602 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 200 ), |
| 602 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 200 ), |
603 | 603 | ) |
604 | 604 | ); |
605 | 605 | $comment_3 = self::factory()->comment->create( |
606 | 606 | array( |
607 | 607 | 'comment_post_ID' => $p, |
608 | 608 | 'comment_content' => '3', |
609 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 300 ), |
| 609 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 300 ), |
610 | 610 | ) |
611 | 611 | ); |
612 | 612 | $comment_4 = self::factory()->comment->create( |
613 | 613 | array( |
614 | 614 | 'comment_post_ID' => $p, |
615 | 615 | 'comment_content' => '4', |
616 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 400 ), |
| 616 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 400 ), |
617 | 617 | ) |
618 | 618 | ); |
619 | 619 | $comment_5 = self::factory()->comment->create( |
620 | 620 | array( |
621 | 621 | 'comment_post_ID' => $p, |
622 | 622 | 'comment_content' => '4', |
623 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 500 ), |
| 623 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 500 ), |
624 | 624 | ) |
625 | 625 | ); |
626 | 626 | $comment_6 = self::factory()->comment->create( |
627 | 627 | array( |
628 | 628 | 'comment_post_ID' => $p, |
629 | 629 | 'comment_content' => '4', |
630 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 600 ), |
| 630 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 600 ), |
631 | 631 | ) |
632 | 632 | ); |
633 | 633 | |
… |
… |
|
706 | 706 | 'comment_post_ID' => $p, |
707 | 707 | 'comment_content' => '1', |
708 | 708 | 'comment_approved' => '0', |
709 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 100 ), |
| 709 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 100 ), |
710 | 710 | ) |
711 | 711 | ); |
712 | 712 | $comment_2 = self::factory()->comment->create( |
… |
… |
|
714 | 714 | 'comment_post_ID' => $p, |
715 | 715 | 'comment_content' => '2', |
716 | 716 | 'comment_approved' => '0', |
717 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 200 ), |
| 717 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 200 ), |
718 | 718 | ) |
719 | 719 | ); |
720 | 720 | $comment_3 = self::factory()->comment->create( |
… |
… |
|
722 | 722 | 'comment_post_ID' => $p, |
723 | 723 | 'comment_content' => '3', |
724 | 724 | 'comment_approved' => '0', |
725 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 300 ), |
| 725 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 300 ), |
726 | 726 | ) |
727 | 727 | ); |
728 | 728 | $comment_4 = self::factory()->comment->create( |
… |
… |
|
730 | 730 | 'comment_post_ID' => $p, |
731 | 731 | 'comment_content' => '4', |
732 | 732 | 'comment_approved' => '1', |
733 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 400 ), |
| 733 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 400 ), |
734 | 734 | ) |
735 | 735 | ); |
736 | 736 | |
… |
… |
|
762 | 762 | 'comment_post_ID' => $p, |
763 | 763 | 'comment_content' => '1', |
764 | 764 | 'comment_approved' => '0', |
765 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 100 ), |
| 765 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 100 ), |
766 | 766 | ) |
767 | 767 | ); |
768 | 768 | $comment_2 = self::factory()->comment->create( |
… |
… |
|
770 | 770 | 'comment_post_ID' => $p, |
771 | 771 | 'comment_content' => '2', |
772 | 772 | 'comment_approved' => '0', |
773 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 200 ), |
| 773 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 200 ), |
774 | 774 | ) |
775 | 775 | ); |
776 | 776 | $comment_3 = self::factory()->comment->create( |
… |
… |
|
778 | 778 | 'comment_post_ID' => $p, |
779 | 779 | 'comment_content' => '3', |
780 | 780 | 'comment_approved' => '0', |
781 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 100 ), |
| 781 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 100 ), |
782 | 782 | 'comment_author_email' => $comment_author_email, |
783 | 783 | ) |
784 | 784 | ); |
… |
… |
|
787 | 787 | 'comment_post_ID' => $p, |
788 | 788 | 'comment_content' => '4', |
789 | 789 | 'comment_approved' => '0', |
790 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 200 ), |
| 790 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 200 ), |
791 | 791 | 'comment_author_email' => $comment_author_email, |
792 | 792 | ) |
793 | 793 | ); |
… |
… |
|
796 | 796 | 'comment_post_ID' => $p, |
797 | 797 | 'comment_content' => '5', |
798 | 798 | 'comment_approved' => '0', |
799 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 300 ), |
| 799 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 300 ), |
800 | 800 | 'comment_author_email' => $comment_author_email, |
801 | 801 | ) |
802 | 802 | ); |
… |
… |
|
805 | 805 | 'comment_post_ID' => $p, |
806 | 806 | 'comment_content' => '6', |
807 | 807 | 'comment_approved' => '1', |
808 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 400 ), |
| 808 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 400 ), |
809 | 809 | ) |
810 | 810 | ); |
811 | 811 | |
… |
… |
|
842 | 842 | 'comment_post_ID' => $p, |
843 | 843 | 'comment_content' => '1', |
844 | 844 | 'comment_approved' => '0', |
845 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now ), |
| 845 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now ), |
846 | 846 | 'comment_author_email' => 'foo@bar.mail', |
847 | 847 | ) |
848 | 848 | ); |
… |
… |
|
878 | 878 | 'comment_post_ID' => $p, |
879 | 879 | 'comment_content' => '1', |
880 | 880 | 'comment_approved' => '1', |
881 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 100 ), |
| 881 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 100 ), |
882 | 882 | ) |
883 | 883 | ); |
884 | 884 | $comment_2 = self::factory()->comment->create( |
… |
… |
|
886 | 886 | 'comment_post_ID' => $p, |
887 | 887 | 'comment_content' => '2', |
888 | 888 | 'comment_approved' => '1', |
889 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 300 ), |
| 889 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 300 ), |
890 | 890 | ) |
891 | 891 | ); |
892 | 892 | $comment_3 = self::factory()->comment->create( |
… |
… |
|
895 | 895 | 'comment_content' => '3', |
896 | 896 | 'comment_approved' => '1', |
897 | 897 | 'comment_parent' => $comment_1, |
898 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 200 ), |
| 898 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 200 ), |
899 | 899 | ) |
900 | 900 | ); |
901 | 901 | |
… |
… |
|
923 | 923 | 'comment_post_ID' => $p, |
924 | 924 | 'comment_content' => '1', |
925 | 925 | 'comment_approved' => '1', |
926 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 300 ), |
| 926 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 300 ), |
927 | 927 | ) |
928 | 928 | ); |
929 | 929 | $comment_2 = self::factory()->comment->create( |
… |
… |
|
931 | 931 | 'comment_post_ID' => $p, |
932 | 932 | 'comment_content' => '2', |
933 | 933 | 'comment_approved' => '1', |
934 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 200 ), |
| 934 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 200 ), |
935 | 935 | ) |
936 | 936 | ); |
937 | 937 | $comment_3 = self::factory()->comment->create( |
… |
… |
|
940 | 940 | 'comment_content' => '3', |
941 | 941 | 'comment_approved' => '1', |
942 | 942 | 'comment_parent' => $comment_1, |
943 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 100 ), |
| 943 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 100 ), |
944 | 944 | ) |
945 | 945 | ); |
946 | 946 | |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
1476 | 1476 | $post_data['post_status'] = 'draft'; |
1477 | 1477 | $now = time(); |
1478 | 1478 | /* translators: 1: Post creation date, 2: Post creation time */ |
1479 | | $post_data['post_title'] = sprintf( __( 'Draft created on %1$s at %2$s' ), date( __( 'F j, Y' ), $now ), date( __( 'g:i a' ), $now ) ); |
| 1479 | $post_data['post_title'] = sprintf( __( 'Draft created on %1$s at %2$s' ), gmdate( __( 'F j, Y' ), $now ), gmdate( __( 'g:i a' ), $now ) ); |
1480 | 1480 | |
1481 | 1481 | $pid = edit_post( $post_data ); |
1482 | 1482 | if ( $pid ) { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
42 | 42 | 'comment_content' => 'Yes, we can!', |
43 | 43 | 'comment_author_IP' => '192.168.0.1', |
44 | 44 | 'comment_parent' => 0, |
45 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now ), |
| 45 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now ), |
46 | 46 | 'comment_agent' => 'Bobbot/2.1', |
47 | 47 | 'comment_type' => '', |
48 | 48 | ); |
… |
… |
|
65 | 65 | 'comment_content' => 'Yes, we can!', |
66 | 66 | 'comment_author_IP' => '192.168.0.1', |
67 | 67 | 'comment_parent' => 0, |
68 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now ), |
| 68 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now ), |
69 | 69 | 'comment_agent' => 'Bobbot/2.1', |
70 | 70 | 'comment_type' => '', |
71 | 71 | ); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
142 | 142 | $comments[] = self::factory()->comment->create( |
143 | 143 | array( |
144 | 144 | 'comment_post_ID' => $posts[0], |
145 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - ( 60 * $i ) ), |
| 145 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - ( 60 * $i ) ), |
146 | 146 | ) |
147 | 147 | ); |
148 | 148 | } |
… |
… |
|
190 | 190 | $comments[] = self::factory()->comment->create( |
191 | 191 | array( |
192 | 192 | 'comment_post_ID' => $posts[0], |
193 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - ( 60 * $i ) ), |
| 193 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - ( 60 * $i ) ), |
194 | 194 | ) |
195 | 195 | ); |
196 | 196 | } |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
16 | 16 | $comments[] = self::factory()->comment->create( |
17 | 17 | array( |
18 | 18 | 'comment_post_ID' => $p, |
19 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - $i ), |
| 19 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - $i ), |
20 | 20 | 'comment_author' => 'Commenter ' . $i, |
21 | 21 | ) |
22 | 22 | ); |
… |
… |
|
54 | 54 | $comments[] = self::factory()->comment->create( |
55 | 55 | array( |
56 | 56 | 'comment_post_ID' => $p, |
57 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - $i ), |
| 57 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - $i ), |
58 | 58 | 'comment_author' => 'Commenter ' . $i, |
59 | 59 | ) |
60 | 60 | ); |
… |
… |
|
92 | 92 | $comments[] = self::factory()->comment->create( |
93 | 93 | array( |
94 | 94 | 'comment_post_ID' => $p, |
95 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - $i ), |
| 95 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - $i ), |
96 | 96 | 'comment_author' => 'Commenter ' . $i, |
97 | 97 | ) |
98 | 98 | ); |
… |
… |
|
138 | 138 | $comments[] = self::factory()->comment->create( |
139 | 139 | array( |
140 | 140 | 'comment_post_ID' => $p, |
141 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - $i ), |
| 141 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - $i ), |
142 | 142 | 'comment_author' => 'Commenter ' . $i, |
143 | 143 | ) |
144 | 144 | ); |
… |
… |
|
178 | 178 | $comments[] = self::factory()->comment->create( |
179 | 179 | array( |
180 | 180 | 'comment_post_ID' => $p, |
181 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - $i ), |
| 181 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - $i ), |
182 | 182 | 'comment_author' => 'Commenter ' . $i, |
183 | 183 | ) |
184 | 184 | ); |
… |
… |
|
223 | 223 | $comments[] = self::factory()->comment->create( |
224 | 224 | array( |
225 | 225 | 'comment_post_ID' => $p, |
226 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - $i ), |
| 226 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - $i ), |
227 | 227 | 'comment_author' => 'Commenter ' . $i, |
228 | 228 | 'user_id' => $u, |
229 | 229 | ) |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
87 | 87 | $title .= ' ('; |
88 | 88 | $title .= sprintf( |
89 | 89 | __( 'Last updated: %s' ), |
90 | | date( |
| 90 | gmdate( |
91 | 91 | get_option( 'links_updated_date_format' ), |
92 | 92 | $bookmark->link_updated_f + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) |
93 | 93 | ) |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
3430 | 3430 | if ( $tz ) { |
3431 | 3431 | $datetime = date_create( $string, new DateTimeZone( 'UTC' ) ); |
3432 | 3432 | if ( ! $datetime ) { |
3433 | | return date( $format, 0 ); |
| 3433 | return gmdate( $format, 0 ); |
3434 | 3434 | } |
3435 | 3435 | $datetime->setTimezone( new DateTimeZone( $tz ) ); |
3436 | 3436 | $string_localtime = $datetime->format( $format ); |
3437 | 3437 | } else { |
3438 | 3438 | if ( ! 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 ) ) { |
3439 | | return date( $format, 0 ); |
| 3439 | return gmdate( $format, 0 ); |
3440 | 3440 | } |
3441 | 3441 | $string_time = gmmktime( $matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1] ); |
3442 | 3442 | $string_localtime = gmdate( $format, $string_time + get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
15 | 15 | array( |
16 | 16 | 'comment_post_ID' => self::$p, |
17 | 17 | 'comment_content' => '1', |
18 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 100 ), |
| 18 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 100 ), |
19 | 19 | ) |
20 | 20 | ); |
21 | 21 | self::$comments[] = self::factory()->comment->create( |
22 | 22 | array( |
23 | 23 | 'comment_post_ID' => self::$p, |
24 | 24 | 'comment_content' => '2', |
25 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 200 ), |
| 25 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 200 ), |
26 | 26 | ) |
27 | 27 | ); |
28 | 28 | self::$comments[] = self::factory()->comment->create( |
29 | 29 | array( |
30 | 30 | 'comment_post_ID' => self::$p, |
31 | 31 | 'comment_content' => '3', |
32 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 300 ), |
| 32 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 300 ), |
33 | 33 | ) |
34 | 34 | ); |
35 | 35 | self::$comments[] = self::factory()->comment->create( |
36 | 36 | array( |
37 | 37 | 'comment_post_ID' => self::$p, |
38 | 38 | 'comment_content' => '4', |
39 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 400 ), |
| 39 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 400 ), |
40 | 40 | ) |
41 | 41 | ); |
42 | 42 | self::$comments[] = self::factory()->comment->create( |
43 | 43 | array( |
44 | 44 | 'comment_post_ID' => self::$p, |
45 | 45 | 'comment_content' => '4', |
46 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 500 ), |
| 46 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 500 ), |
47 | 47 | ) |
48 | 48 | ); |
49 | 49 | self::$comments[] = self::factory()->comment->create( |
50 | 50 | array( |
51 | 51 | 'comment_post_ID' => self::$p, |
52 | 52 | 'comment_content' => '4', |
53 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 600 ), |
| 53 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 600 ), |
54 | 54 | ) |
55 | 55 | ); |
56 | 56 | |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
960 | 960 | |
961 | 961 | if ( $show_updated ) |
962 | 962 | if (substr($row->link_updated_f, 0, 2) != '00') |
963 | | $title .= ' ('.__('Last updated') . ' ' . date(get_option('links_updated_date_format'), $row->link_updated_f + (get_option('gmt_offset') * HOUR_IN_SECONDS)) . ')'; |
| 963 | $title .= ' ('.__('Last updated') . ' ' . gmdate(get_option('links_updated_date_format'), $row->link_updated_f + (get_option('gmt_offset') * HOUR_IN_SECONDS)) . ')'; |
964 | 964 | |
965 | 965 | if ( '' != $title ) |
966 | 966 | $title = ' title="' . $title . '"'; |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
45 | 45 | array( |
46 | 46 | 'comment_post_ID' => $p, |
47 | 47 | 'comment_type' => 'trackback', |
48 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now ), |
| 48 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now ), |
49 | 49 | ) |
50 | 50 | ); |
51 | 51 | $now -= 10 * $i; |
… |
… |
|
57 | 57 | array( |
58 | 58 | 'comment_post_ID' => $p, |
59 | 59 | 'comment_type' => 'pingback', |
60 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now ), |
| 60 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now ), |
61 | 61 | ) |
62 | 62 | ); |
63 | 63 | $now -= 10 * $i; |
… |
… |
|
135 | 135 | array( |
136 | 136 | 'comment_post_ID' => $p, |
137 | 137 | 'comment_type' => 'trackback', |
138 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - ( 10 * $i ) ), |
| 138 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - ( 10 * $i ) ), |
139 | 139 | ) |
140 | 140 | ); |
141 | 141 | } |
… |
… |
|
226 | 226 | $c1 = self::factory()->comment->create( |
227 | 227 | array( |
228 | 228 | 'comment_post_ID' => $p, |
229 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now ), |
| 229 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now ), |
230 | 230 | ) |
231 | 231 | ); |
232 | 232 | $c2 = self::factory()->comment->create( |
233 | 233 | array( |
234 | 234 | 'comment_post_ID' => $p, |
235 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 20 ), |
| 235 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 20 ), |
236 | 236 | ) |
237 | 237 | ); |
238 | 238 | $c3 = self::factory()->comment->create( |
239 | 239 | array( |
240 | 240 | 'comment_post_ID' => $p, |
241 | 241 | 'comment_approved' => 0, |
242 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 30 ), |
| 242 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 30 ), |
243 | 243 | ) |
244 | 244 | ); |
245 | 245 | |
… |
… |
|
262 | 262 | $comments_0[] = self::factory()->comment->create( |
263 | 263 | array( |
264 | 264 | 'comment_post_ID' => $posts[0], |
265 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - ( $i * 60 ) ), |
| 265 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - ( $i * 60 ) ), |
266 | 266 | ) |
267 | 267 | ); |
268 | 268 | $comments_1[] = self::factory()->comment->create( |
269 | 269 | array( |
270 | 270 | 'comment_post_ID' => $posts[1], |
271 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - ( $i * 60 ) ), |
| 271 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - ( $i * 60 ) ), |
272 | 272 | ) |
273 | 273 | ); |
274 | 274 | } |
… |
… |
|
292 | 292 | $parent = self::factory()->comment->create( |
293 | 293 | array( |
294 | 294 | 'comment_post_ID' => $post, |
295 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - ( $i * 60 ) ), |
| 295 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - ( $i * 60 ) ), |
296 | 296 | ) |
297 | 297 | ); |
298 | 298 | $comment_parents[ $i ] = $parent; |
… |
… |
|
300 | 300 | $child = self::factory()->comment->create( |
301 | 301 | array( |
302 | 302 | 'comment_post_ID' => $post, |
303 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - ( $i * 59 ) ), |
| 303 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - ( $i * 59 ) ), |
304 | 304 | 'comment_parent' => $parent, |
305 | 305 | ) |
306 | 306 | ); |
… |
… |
|
336 | 336 | $c1 = self::factory()->comment->create( |
337 | 337 | array( |
338 | 338 | 'comment_post_ID' => $p, |
339 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now ), |
| 339 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now ), |
340 | 340 | ) |
341 | 341 | ); |
342 | 342 | $c2 = self::factory()->comment->create( |
343 | 343 | array( |
344 | 344 | 'comment_post_ID' => $p, |
345 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 20 ), |
| 345 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 20 ), |
346 | 346 | ) |
347 | 347 | ); |
348 | 348 | $c3 = self::factory()->comment->create( |
349 | 349 | array( |
350 | 350 | 'comment_post_ID' => $p, |
351 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 30 ), |
| 351 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 30 ), |
352 | 352 | ) |
353 | 353 | ); |
354 | 354 | |
… |
… |
|
369 | 369 | $c1 = self::factory()->comment->create( |
370 | 370 | array( |
371 | 371 | 'comment_post_ID' => $p, |
372 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now ), |
| 372 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now ), |
373 | 373 | ) |
374 | 374 | ); |
375 | 375 | $c2 = self::factory()->comment->create( |
376 | 376 | array( |
377 | 377 | 'comment_post_ID' => $p, |
378 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 20 ), |
| 378 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 20 ), |
379 | 379 | ) |
380 | 380 | ); |
381 | 381 | $c3 = self::factory()->comment->create( |
382 | 382 | array( |
383 | 383 | 'comment_post_ID' => $p, |
384 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 30 ), |
| 384 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 30 ), |
385 | 385 | ) |
386 | 386 | ); |
387 | 387 | $c4 = self::factory()->comment->create( |
388 | 388 | array( |
389 | 389 | 'comment_post_ID' => $p, |
390 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 40 ), |
| 390 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 40 ), |
391 | 391 | ) |
392 | 392 | ); |
393 | 393 | |
… |
… |
|
409 | 409 | $c1 = self::factory()->comment->create( |
410 | 410 | array( |
411 | 411 | 'comment_post_ID' => $p, |
412 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now ), |
| 412 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now ), |
413 | 413 | ) |
414 | 414 | ); |
415 | 415 | $c2 = self::factory()->comment->create( |
416 | 416 | array( |
417 | 417 | 'comment_post_ID' => $p, |
418 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 20 ), |
| 418 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 20 ), |
419 | 419 | ) |
420 | 420 | ); |
421 | 421 | $c3 = self::factory()->comment->create( |
422 | 422 | array( |
423 | 423 | 'comment_post_ID' => $p, |
424 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 30 ), |
| 424 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 30 ), |
425 | 425 | ) |
426 | 426 | ); |
427 | 427 | $c4 = self::factory()->comment->create( |
428 | 428 | array( |
429 | 429 | 'comment_post_ID' => $p, |
430 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 40 ), |
| 430 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 40 ), |
431 | 431 | ) |
432 | 432 | ); |
433 | 433 | |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
2107 | 2107 | } |
2108 | 2108 | |
2109 | 2109 | $unixmonth = mktime( 0, 0, 0, $thismonth, 1, $thisyear ); |
2110 | | $last_day = date( 't', $unixmonth ); |
| 2110 | $last_day = gmdate( 't', $unixmonth ); |
2111 | 2111 | |
2112 | 2112 | // Get the next and previous month and year with at least one post |
2113 | 2113 | $previous = $wpdb->get_row( |
… |
… |
|
2133 | 2133 | <caption>' . sprintf( |
2134 | 2134 | $calendar_caption, |
2135 | 2135 | $wp_locale->get_month( $thismonth ), |
2136 | | date( 'Y', $unixmonth ) |
| 2136 | gmdate( 'Y', $unixmonth ) |
2137 | 2137 | ) . '</caption> |
2138 | 2138 | <thead> |
2139 | 2139 | <tr>'; |
… |
… |
|
2199 | 2199 | } |
2200 | 2200 | |
2201 | 2201 | // See how much we should pad in the beginning |
2202 | | $pad = calendar_week_mod( date( 'w', $unixmonth ) - $week_begins ); |
| 2202 | $pad = calendar_week_mod( gmdate( 'w', $unixmonth ) - $week_begins ); |
2203 | 2203 | if ( 0 != $pad ) { |
2204 | 2204 | $calendar_output .= "\n\t\t" . '<td colspan="' . esc_attr( $pad ) . '" class="pad"> </td>'; |
2205 | 2205 | } |
2206 | 2206 | |
2207 | 2207 | $newrow = false; |
2208 | | $daysinmonth = (int) date( 't', $unixmonth ); |
| 2208 | $daysinmonth = (int) gmdate( 't', $unixmonth ); |
2209 | 2209 | |
2210 | 2210 | for ( $day = 1; $day <= $daysinmonth; ++$day ) { |
2211 | 2211 | if ( isset( $newrow ) && $newrow ) { |
… |
… |
|
2223 | 2223 | |
2224 | 2224 | if ( in_array( $day, $daywithpost ) ) { |
2225 | 2225 | // any posts today? |
2226 | | $date_format = date( _x( 'F j, Y', 'daily archives date format' ), strtotime( "{$thisyear}-{$thismonth}-{$day}" ) ); |
| 2226 | $date_format = gmdate( _x( 'F j, Y', 'daily archives date format' ), strtotime( "{$thisyear}-{$thismonth}-{$day}" ) ); |
2227 | 2227 | /* translators: Post calendar label. %s: Date */ |
2228 | 2228 | $label = sprintf( __( 'Posts published on %s' ), $date_format ); |
2229 | 2229 | $calendar_output .= sprintf( |
… |
… |
|
2237 | 2237 | } |
2238 | 2238 | $calendar_output .= '</td>'; |
2239 | 2239 | |
2240 | | if ( 6 == calendar_week_mod( date( 'w', mktime( 0, 0, 0, $thismonth, $day, $thisyear ) ) - $week_begins ) ) { |
| 2240 | if ( 6 == calendar_week_mod( gmdate( 'w', mktime( 0, 0, 0, $thismonth, $day, $thisyear ) ) - $week_begins ) ) { |
2241 | 2241 | $newrow = true; |
2242 | 2242 | } |
2243 | 2243 | } |
2244 | 2244 | |
2245 | | $pad = 7 - calendar_week_mod( date( 'w', mktime( 0, 0, 0, $thismonth, $day, $thisyear ) ) - $week_begins ); |
| 2245 | $pad = 7 - calendar_week_mod( gmdate( 'w', mktime( 0, 0, 0, $thismonth, $day, $thisyear ) ) - $week_begins ); |
2246 | 2246 | if ( $pad != 0 && $pad != 7 ) { |
2247 | 2247 | $calendar_output .= "\n\t\t" . '<td class="pad" colspan="' . esc_attr( $pad ) . '"> </td>'; |
2248 | 2248 | } |
… |
… |
|
4434 | 4434 | $gen = '<!-- generator="WordPress/' . esc_attr( get_bloginfo( 'version' ) ) . '" -->'; |
4435 | 4435 | break; |
4436 | 4436 | case 'export': |
4437 | | $gen = '<!-- generator="WordPress/' . esc_attr( get_bloginfo_rss( 'version' ) ) . '" created="' . date( 'Y-m-d H:i' ) . '" -->'; |
| 4437 | $gen = '<!-- generator="WordPress/' . esc_attr( get_bloginfo_rss( 'version' ) ) . '" created="' . gmdate( 'Y-m-d H:i' ) . '" -->'; |
4438 | 4438 | break; |
4439 | 4439 | } |
4440 | 4440 | |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
941 | 941 | |
942 | 942 | $time_difference = $all_options->time_difference; |
943 | 943 | |
944 | | $server_time = time() + date( 'Z' ); |
| 944 | $server_time = time() + gmdate( 'Z' ); |
945 | 945 | $weblogger_time = $server_time + $time_difference * HOUR_IN_SECONDS; |
946 | 946 | $gmt_time = time(); |
947 | 947 | |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
99 | 99 | remove_filter( 'wpmu_signup_user_notification', '__return_true' ); |
100 | 100 | |
101 | 101 | global $wpdb; |
102 | | $date = date( 'Y-m-d H:i:s', time() - ( 2 * DAY_IN_SECONDS ) - 60 ); |
| 102 | $date = gmdate( 'Y-m-d H:i:s', time() - ( 2 * DAY_IN_SECONDS ) - 60 ); |
103 | 103 | $wpdb->update( $wpdb->signups, array( 'registered' => $date ), array( 'user_login' => 'foo123' ) ); |
104 | 104 | |
105 | 105 | $v = wpmu_validate_user_signup( 'foo123', 'foo2@example.com' ); |
… |
… |
|
123 | 123 | remove_filter( 'wpmu_signup_user_notification', '__return_true' ); |
124 | 124 | |
125 | 125 | global $wpdb; |
126 | | $date = date( 'Y-m-d H:i:s', time() - ( 2 * DAY_IN_SECONDS ) - 60 ); |
| 126 | $date = gmdate( 'Y-m-d H:i:s', time() - ( 2 * DAY_IN_SECONDS ) - 60 ); |
127 | 127 | $wpdb->update( $wpdb->signups, array( 'registered' => $date ), array( 'user_login' => 'foo123' ) ); |
128 | 128 | |
129 | 129 | $v = wpmu_validate_user_signup( 'foo2', 'foo2@example.com' ); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
79 | 79 | if ( ! empty( $sitename ) ) { |
80 | 80 | $sitename .= '.'; |
81 | 81 | } |
82 | | $date = date( 'Y-m-d' ); |
| 82 | $date = gmdate( 'Y-m-d' ); |
83 | 83 | $wp_filename = $sitename . 'WordPress.' . $date . '.xml'; |
84 | 84 | /** |
85 | 85 | * Filters the export filename. |
… |
… |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | if ( $args['start_date'] ) { |
132 | | $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_date >= %s", date( 'Y-m-d', strtotime( $args['start_date'] ) ) ); |
| 132 | $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_date >= %s", gmdate( 'Y-m-d', strtotime( $args['start_date'] ) ) ); |
133 | 133 | } |
134 | 134 | |
135 | 135 | if ( $args['end_date'] ) { |
136 | | $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_date < %s", date( 'Y-m-d', strtotime( '+1 month', strtotime( $args['end_date'] ) ) ) ); |
| 136 | $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_date < %s", gmdate( 'Y-m-d', strtotime( '+1 month', strtotime( $args['end_date'] ) ) ) ); |
137 | 137 | } |
138 | 138 | } |
139 | 139 | |
… |
… |
|
458 | 458 | <title><?php bloginfo_rss( 'name' ); ?></title> |
459 | 459 | <link><?php bloginfo_rss( 'url' ); ?></link> |
460 | 460 | <description><?php bloginfo_rss( 'description' ); ?></description> |
461 | | <pubDate><?php echo date( 'D, d M Y H:i:s +0000' ); ?></pubDate> |
| 461 | <pubDate><?php echo gmdate( 'D, d M Y H:i:s +0000' ); ?></pubDate> |
462 | 462 | <language><?php bloginfo_rss( 'language' ); ?></language> |
463 | 463 | <wp:wxr_version><?php echo WXR_VERSION; ?></wp:wxr_version> |
464 | 464 | <wp:base_site_url><?php echo wxr_site_url(); ?></wp:base_site_url> |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
1478 | 1478 | // based on the `post_modified` field with the site's timezone |
1479 | 1479 | // offset applied. |
1480 | 1480 | if ( '0000-00-00 00:00:00' === $post->post_modified_gmt ) { |
1481 | | $post_modified_gmt = date( 'Y-m-d H:i:s', strtotime( $post->post_modified ) - ( get_option( 'gmt_offset' ) * 3600 ) ); |
| 1481 | $post_modified_gmt = gmdate( 'Y-m-d H:i:s', strtotime( $post->post_modified ) - ( get_option( 'gmt_offset' ) * 3600 ) ); |
1482 | 1482 | } else { |
1483 | 1483 | $post_modified_gmt = $post->post_modified_gmt; |
1484 | 1484 | } |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
355 | 355 | $permalink_structure = '%postname%'; |
356 | 356 | $this->set_permalink_structure( "/$permalink_structure/" ); |
357 | 357 | |
358 | | $future_date = date( 'Y-m-d H:i:s', time() + 100 ); |
| 358 | $future_date = gmdate( 'Y-m-d H:i:s', time() + 100 ); |
359 | 359 | $p = self::factory()->post->create( |
360 | 360 | array( |
361 | 361 | 'post_status' => 'future', |
… |
… |
|
377 | 377 | public function test_get_sample_permalink_html_should_use_default_permalink_for_view_post_link_when_pretty_permalinks_are_disabled() { |
378 | 378 | wp_set_current_user( self::$admin_id ); |
379 | 379 | |
380 | | $future_date = date( 'Y-m-d H:i:s', time() + 100 ); |
| 380 | $future_date = gmdate( 'Y-m-d H:i:s', time() + 100 ); |
381 | 381 | $p = self::factory()->post->create( |
382 | 382 | array( |
383 | 383 | 'post_status' => 'future', |
… |
… |
|
400 | 400 | |
401 | 401 | wp_set_current_user( self::$admin_id ); |
402 | 402 | |
403 | | $future_date = date( 'Y-m-d H:i:s', time() + 100 ); |
| 403 | $future_date = gmdate( 'Y-m-d H:i:s', time() + 100 ); |
404 | 404 | $p = self::factory()->post->create( |
405 | 405 | array( |
406 | 406 | 'post_status' => 'future', |
… |
… |
|
464 | 464 | $this->assertContains( '>new_slug-صورة<', $found, $message ); |
465 | 465 | |
466 | 466 | // Scheduled posts should use published permalink |
467 | | $future_date = date( 'Y-m-d H:i:s', time() + 100 ); |
| 467 | $future_date = gmdate( 'Y-m-d H:i:s', time() + 100 ); |
468 | 468 | $p = self::factory()->post->create( |
469 | 469 | array( |
470 | 470 | 'post_status' => 'future', |
… |
… |
|
507 | 507 | |
508 | 508 | wp_set_current_user( self::$admin_id ); |
509 | 509 | |
510 | | $future_date = date( 'Y-m-d H:i:s', time() + 100 ); |
| 510 | $future_date = gmdate( 'Y-m-d H:i:s', time() + 100 ); |
511 | 511 | $p = self::factory()->post->create( |
512 | 512 | array( |
513 | 513 | 'post_status' => 'pending', |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
164 | 164 | |
165 | 165 | $this->assertNotWPError( $response ); |
166 | 166 | $this->assertEqualSetsWithIndex( $this->get_user_location(), $response['location'] ); |
167 | | $this->assertEquals( date( 'l, M j, Y', strtotime( 'next Sunday 1pm' ) ), $response['events'][0]['formatted_date'] ); |
| 167 | $this->assertEquals( gmdate( 'l, M j, Y', strtotime( 'next Sunday 1pm' ) ), $response['events'][0]['formatted_date'] ); |
168 | 168 | $this->assertEquals( '1:00 pm', $response['events'][0]['formatted_time'] ); |
169 | 169 | |
170 | 170 | remove_filter( 'pre_http_request', array( $this, '_http_request_valid_response' ) ); |
… |
… |
|
185 | 185 | |
186 | 186 | $this->assertNotWPError( $cached_events ); |
187 | 187 | $this->assertEqualSetsWithIndex( $this->get_user_location(), $cached_events['location'] ); |
188 | | $this->assertEquals( date( 'l, M j, Y', strtotime( 'next Sunday 1pm' ) ), $cached_events['events'][0]['formatted_date'] ); |
| 188 | $this->assertEquals( gmdate( 'l, M j, Y', strtotime( 'next Sunday 1pm' ) ), $cached_events['events'][0]['formatted_date'] ); |
189 | 189 | $this->assertEquals( '1:00 pm', $cached_events['events'][0]['formatted_time'] ); |
190 | 190 | |
191 | 191 | remove_filter( 'pre_http_request', array( $this, '_http_request_valid_response' ) ); |
… |
… |
|
211 | 211 | 'url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/events/236031233/', |
212 | 212 | 'meetup' => 'The East Bay WordPress Meetup Group', |
213 | 213 | 'meetup_url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/', |
214 | | 'date' => date( 'Y-m-d H:i:s', strtotime( 'next Sunday 1pm' ) ), |
| 214 | 'date' => gmdate( 'Y-m-d H:i:s', strtotime( 'next Sunday 1pm' ) ), |
215 | 215 | 'location' => array( |
216 | 216 | 'location' => 'Oakland, CA, USA', |
217 | 217 | 'country' => 'us', |
… |
… |
|
225 | 225 | 'url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/events/237706839/', |
226 | 226 | 'meetup' => 'WordPress Bay Area Foothills Group', |
227 | 227 | 'meetup_url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/', |
228 | | 'date' => date( 'Y-m-d H:i:s', strtotime( 'next Wednesday 1:30pm' ) ), |
| 228 | 'date' => gmdate( 'Y-m-d H:i:s', strtotime( 'next Wednesday 1:30pm' ) ), |
229 | 229 | 'location' => array( |
230 | 230 | 'location' => 'Milpitas, CA, USA', |
231 | 231 | 'country' => 'us', |
… |
… |
|
239 | 239 | 'url' => 'https://2017.kansascity.wordcamp.org', |
240 | 240 | 'meetup' => null, |
241 | 241 | 'meetup_url' => null, |
242 | | 'date' => date( 'Y-m-d H:i:s', strtotime( 'next Saturday' ) ), |
| 242 | 'date' => gmdate( 'Y-m-d H:i:s', strtotime( 'next Saturday' ) ), |
243 | 243 | 'location' => array( |
244 | 244 | 'location' => 'Kansas City, MO', |
245 | 245 | 'country' => 'US', |
… |
… |
|
303 | 303 | 'url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/events/236031233/', |
304 | 304 | 'meetup' => 'The East Bay WordPress Meetup Group', |
305 | 305 | 'meetup_url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/', |
306 | | 'date' => date( 'Y-m-d H:i:s', strtotime( 'next Monday 1pm' ) ), |
| 306 | 'date' => gmdate( 'Y-m-d H:i:s', strtotime( 'next Monday 1pm' ) ), |
307 | 307 | 'location' => array( |
308 | 308 | 'location' => 'Oakland, CA, USA', |
309 | 309 | 'country' => 'us', |
… |
… |
|
317 | 317 | 'url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/events/237706839/', |
318 | 318 | 'meetup' => 'WordPress Bay Area Foothills Group', |
319 | 319 | 'meetup_url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/', |
320 | | 'date' => date( 'Y-m-d H:i:s', strtotime( 'next Tuesday 1:30pm' ) ), |
| 320 | 'date' => gmdate( 'Y-m-d H:i:s', strtotime( 'next Tuesday 1:30pm' ) ), |
321 | 321 | 'location' => array( |
322 | 322 | 'location' => 'Milpitas, CA, USA', |
323 | 323 | 'country' => 'us', |
… |
… |
|
331 | 331 | 'url' => 'https://www.meetup.com/sanjosewp/events/245419844/', |
332 | 332 | 'meetup' => 'The San Jose WordPress Meetup', |
333 | 333 | 'meetup_url' => 'https://www.meetup.com/sanjosewp/', |
334 | | 'date' => date( 'Y-m-d H:i:s', strtotime( 'next Wednesday 5:30pm' ) ), |
| 334 | 'date' => gmdate( 'Y-m-d H:i:s', strtotime( 'next Wednesday 5:30pm' ) ), |
335 | 335 | 'location' => array( |
336 | 336 | 'location' => 'Milpitas, CA, USA', |
337 | 337 | 'country' => 'us', |
… |
… |
|
345 | 345 | 'url' => 'https://2018.sandiego.wordcamp.org', |
346 | 346 | 'meetup' => null, |
347 | 347 | 'meetup_url' => null, |
348 | | 'date' => date( 'Y-m-d H:i:s', strtotime( 'next Thursday 9am' ) ), |
| 348 | 'date' => gmdate( 'Y-m-d H:i:s', strtotime( 'next Thursday 9am' ) ), |
349 | 349 | 'location' => array( |
350 | 350 | 'location' => 'San Diego, CA', |
351 | 351 | 'country' => 'US', |
… |
… |
|
406 | 406 | 'url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/events/236031233/', |
407 | 407 | 'meetup' => 'The East Bay WordPress Meetup Group', |
408 | 408 | 'meetup_url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/', |
409 | | 'date' => date( 'Y-m-d H:i:s', strtotime( '2 days ago' ) ), |
| 409 | 'date' => gmdate( 'Y-m-d H:i:s', strtotime( '2 days ago' ) ), |
410 | 410 | 'location' => array( |
411 | 411 | 'location' => 'Oakland, CA, USA', |
412 | 412 | 'country' => 'us', |
… |
… |
|
420 | 420 | 'url' => 'https://2018.sandiego.wordcamp.org', |
421 | 421 | 'meetup' => null, |
422 | 422 | 'meetup_url' => null, |
423 | | 'date' => date( 'Y-m-d H:i:s', strtotime( 'next Tuesday 9am' ) ), |
| 423 | 'date' => gmdate( 'Y-m-d H:i:s', strtotime( 'next Tuesday 9am' ) ), |
424 | 424 | 'location' => array( |
425 | 425 | 'location' => 'San Diego, CA', |
426 | 426 | 'country' => 'US', |
… |
… |
|
434 | 434 | 'url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/events/237706839/', |
435 | 435 | 'meetup' => 'WordPress Bay Area Foothills Group', |
436 | 436 | 'meetup_url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/', |
437 | | 'date' => date( 'Y-m-d H:i:s', strtotime( 'next Wednesday 1:30pm' ) ), |
| 437 | 'date' => gmdate( 'Y-m-d H:i:s', strtotime( 'next Wednesday 1:30pm' ) ), |
438 | 438 | 'location' => array( |
439 | 439 | 'location' => 'Milpitas, CA, USA', |
440 | 440 | 'country' => 'us', |
… |
… |
|
448 | 448 | 'url' => 'https://www.meetup.com/sanjosewp/events/245419844/', |
449 | 449 | 'meetup' => 'The San Jose WordPress Meetup', |
450 | 450 | 'meetup_url' => 'https://www.meetup.com/sanjosewp/', |
451 | | 'date' => date( 'Y-m-d H:i:s', strtotime( 'next Thursday 5:30pm' ) ), |
| 451 | 'date' => gmdate( 'Y-m-d H:i:s', strtotime( 'next Thursday 5:30pm' ) ), |
452 | 452 | 'location' => array( |
453 | 453 | 'location' => 'Milpitas, CA, USA', |
454 | 454 | 'country' => 'us', |
… |
… |
|
462 | 462 | 'url' => 'https://2018.la.wordcamp.org', |
463 | 463 | 'meetup' => null, |
464 | 464 | 'meetup_url' => null, |
465 | | 'date' => date( 'Y-m-d H:i:s', strtotime( 'next Friday 9am' ) ), |
| 465 | 'date' => gmdate( 'Y-m-d H:i:s', strtotime( 'next Friday 9am' ) ), |
466 | 466 | 'location' => array( |
467 | 467 | 'location' => 'Los Angeles, CA', |
468 | 468 | 'country' => 'US', |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
212 | 212 | $author = $authordata->user_nicename; |
213 | 213 | } |
214 | 214 | |
215 | | $date = explode( ' ', date( 'Y m d H i s', $unixtime ) ); |
| 215 | $date = explode( ' ', gmdate( 'Y m d H i s', $unixtime ) ); |
216 | 216 | $rewritereplace = |
217 | 217 | array( |
218 | 218 | $date[0], |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
15 | 15 | function setUp() { |
16 | 16 | parent::setUp(); |
17 | 17 | |
18 | | $this->month_url = get_month_link( date( 'Y' ), date( 'm' ) ); |
19 | | $this->year_url = get_year_link( date( 'Y' ) ); |
| 18 | $this->month_url = get_month_link( gmdate( 'Y' ), gmdate( 'm' ) ); |
| 19 | $this->year_url = get_year_link( gmdate( 'Y' ) ); |
20 | 20 | } |
21 | 21 | |
22 | 22 | public static function wpSetUpBeforeClass( $factory ) { |
… |
… |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | function test_wp_get_archives_default() { |
33 | | $expected['default'] = "<li><a href='" . $this->month_url . "'>" . date( 'F Y' ) . '</a></li>'; |
| 33 | $expected['default'] = "<li><a href='" . $this->month_url . "'>" . gmdate( 'F Y' ) . '</a></li>'; |
34 | 34 | $this->assertEquals( $expected['default'], trim( wp_get_archives( array( 'echo' => false ) ) ) ); |
35 | 35 | } |
36 | 36 | |
37 | 37 | function test_wp_get_archives_type() { |
38 | | $expected['type'] = "<li><a href='" . $this->year_url . "'>" . date( 'Y' ) . '</a></li>'; |
| 38 | $expected['type'] = "<li><a href='" . $this->year_url . "'>" . gmdate( 'Y' ) . '</a></li>'; |
39 | 39 | $this->assertEquals( |
40 | 40 | $expected['type'], |
41 | 41 | trim( |
… |
… |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | function test_wp_get_archives_format() { |
89 | | $expected['format'] = "<option value='" . $this->month_url . "'> " . date( 'F Y' ) . ' </option>'; |
| 89 | $expected['format'] = "<option value='" . $this->month_url . "'> " . gmdate( 'F Y' ) . ' </option>'; |
90 | 90 | $this->assertEquals( |
91 | 91 | $expected['format'], |
92 | 92 | trim( |
… |
… |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | function test_wp_get_archives_before_and_after() { |
104 | | $expected['before_and_after'] = "<div><a href='" . $this->month_url . "'>" . date( 'F Y' ) . '</a></div>'; |
| 104 | $expected['before_and_after'] = "<div><a href='" . $this->month_url . "'>" . gmdate( 'F Y' ) . '</a></div>'; |
105 | 105 | $this->assertEquals( |
106 | 106 | $expected['before_and_after'], |
107 | 107 | trim( |
… |
… |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | function test_wp_get_archives_show_post_count() { |
121 | | $expected['show_post_count'] = "<li><a href='" . $this->month_url . "'>" . date( 'F Y' ) . '</a> (8)</li>'; |
| 121 | $expected['show_post_count'] = "<li><a href='" . $this->month_url . "'>" . gmdate( 'F Y' ) . '</a> (8)</li>'; |
122 | 122 | $this->assertEquals( |
123 | 123 | $expected['show_post_count'], |
124 | 124 | trim( |
… |
… |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | function test_wp_get_archives_echo() { |
136 | | $expected['echo'] = "\t<li><a href='" . $this->month_url . "'>" . date( 'F Y' ) . '</a></li>' . "\n"; |
| 136 | $expected['echo'] = "\t<li><a href='" . $this->month_url . "'>" . gmdate( 'F Y' ) . '</a></li>' . "\n"; |
137 | 137 | $this->expectOutputString( $expected['echo'] ); |
138 | 138 | wp_get_archives( array( 'echo' => true ) ); |
139 | 139 | } |
… |
… |
|
147 | 147 | ) |
148 | 148 | ); |
149 | 149 | |
150 | | $date_full = date( 'F Y' ); |
| 150 | $date_full = gmdate( 'F Y' ); |
151 | 151 | $oct_url = get_month_link( 2012, 10 ); |
152 | 152 | $expected['order_asc'] = <<<EOF |
153 | 153 | <li><a href='{$oct_url}'>October 2012</a></li> |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
925 | 925 | } |
926 | 926 | |
927 | 927 | if ( in_array( 'registered_date', $fields, true ) ) { |
928 | | $data['registered_date'] = date( 'c', strtotime( $user->user_registered ) ); |
| 928 | $data['registered_date'] = gmdate( 'c', strtotime( $user->user_registered ) ); |
929 | 929 | } |
930 | 930 | |
931 | 931 | if ( in_array( 'capabilities', $fields, true ) ) { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
2949 | 2949 | $c1 = self::factory()->comment->create( |
2950 | 2950 | array( |
2951 | 2951 | 'comment_post_ID' => self::$post_id, |
2952 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 50 ), |
| 2952 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 50 ), |
2953 | 2953 | ) |
2954 | 2954 | ); |
2955 | 2955 | $c2 = self::factory()->comment->create( |
2956 | 2956 | array( |
2957 | 2957 | 'comment_post_ID' => self::$post_id, |
2958 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 40 ), |
| 2958 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 40 ), |
2959 | 2959 | ) |
2960 | 2960 | ); |
2961 | 2961 | $c3 = self::factory()->comment->create( |
2962 | 2962 | array( |
2963 | 2963 | 'comment_post_ID' => self::$post_id, |
2964 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 30 ), |
| 2964 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 30 ), |
2965 | 2965 | ) |
2966 | 2966 | ); |
2967 | 2967 | $c4 = self::factory()->comment->create( |
2968 | 2968 | array( |
2969 | 2969 | 'comment_post_ID' => self::$post_id, |
2970 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 20 ), |
| 2970 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 20 ), |
2971 | 2971 | ) |
2972 | 2972 | ); |
2973 | 2973 | |
… |
… |
|
2995 | 2995 | $c1 = self::factory()->comment->create( |
2996 | 2996 | array( |
2997 | 2997 | 'comment_post_ID' => self::$post_id, |
2998 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 50 ), |
| 2998 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 50 ), |
2999 | 2999 | ) |
3000 | 3000 | ); |
3001 | 3001 | $c2 = self::factory()->comment->create( |
3002 | 3002 | array( |
3003 | 3003 | 'comment_post_ID' => self::$post_id, |
3004 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 40 ), |
| 3004 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 40 ), |
3005 | 3005 | ) |
3006 | 3006 | ); |
3007 | 3007 | $c3 = self::factory()->comment->create( |
3008 | 3008 | array( |
3009 | 3009 | 'comment_post_ID' => self::$post_id, |
3010 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 30 ), |
| 3010 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 30 ), |
3011 | 3011 | ) |
3012 | 3012 | ); |
3013 | 3013 | $c4 = self::factory()->comment->create( |
3014 | 3014 | array( |
3015 | 3015 | 'comment_post_ID' => self::$post_id, |
3016 | | 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 20 ), |
| 3016 | 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 20 ), |
3017 | 3017 | ) |
3018 | 3018 | ); |
3019 | 3019 | |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
60 | 60 | $post_ids[] = self::factory()->post->create( |
61 | 61 | array( |
62 | 62 | 'post_type' => $cpt_name, |
63 | | 'post_date' => date( 'Y-m-d H:i:s', time() + $i ), |
| 63 | 'post_date' => gmdate( 'Y-m-d H:i:s', time() + $i ), |
64 | 64 | ) |
65 | 65 | ); |
66 | 66 | } |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
274 | 274 | 'post_content' => 'Not edited', |
275 | 275 | 'post_author' => $editor_id, |
276 | 276 | 'post_status' => 'publish', |
277 | | 'post_date' => date( 'Y-m-d H:i:s', $yesterday ), |
| 277 | 'post_date' => gmdate( 'Y-m-d H:i:s', $yesterday ), |
278 | 278 | ) |
279 | 279 | ); |
280 | 280 | |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
621 | 621 | $b['month'] = $lucifer[5]; |
622 | 622 | $b['day'] = $lucifer[6]; |
623 | 623 | if ( preg_match( '/([0-9]{2}):([0-9]{2})/', $lucifer[7], $l2 ) ) { |
624 | | $b['year'] = date( 'Y' ); |
| 624 | $b['year'] = gmdate( 'Y' ); |
625 | 625 | $b['hour'] = $l2[1]; |
626 | 626 | $b['minute'] = $l2[2]; |
627 | 627 | } else { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
170 | 170 | $hh = $post_data['hh']; |
171 | 171 | $mn = $post_data['mn']; |
172 | 172 | $ss = $post_data['ss']; |
173 | | $aa = ( $aa <= 0 ) ? date( 'Y' ) : $aa; |
174 | | $mm = ( $mm <= 0 ) ? date( 'n' ) : $mm; |
| 173 | $aa = ( $aa <= 0 ) ? gmdate( 'Y' ) : $aa; |
| 174 | $mm = ( $mm <= 0 ) ? gmdate( 'n' ) : $mm; |
175 | 175 | $jj = ( $jj > 31 ) ? 31 : $jj; |
176 | | $jj = ( $jj <= 0 ) ? date( 'j' ) : $jj; |
| 176 | $jj = ( $jj <= 0 ) ? gmdate( 'j' ) : $jj; |
177 | 177 | $hh = ( $hh > 23 ) ? $hh - 24 : $hh; |
178 | 178 | $mn = ( $mn > 59 ) ? $mn - 60 : $mn; |
179 | 179 | $ss = ( $ss > 59 ) ? $ss - 60 : $ss; |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
10 | 10 | $this->assertEquals( $post->post_name, $data['slug'] ); |
11 | 11 | $this->assertEquals( get_permalink( $post->ID ), $data['link'] ); |
12 | 12 | if ( '0000-00-00 00:00:00' === $post->post_date_gmt ) { |
13 | | $post_date_gmt = date( 'Y-m-d H:i:s', strtotime( $post->post_date ) - ( get_option( 'gmt_offset' ) * 3600 ) ); |
| 13 | $post_date_gmt = gmdate( 'Y-m-d H:i:s', strtotime( $post->post_date ) - ( get_option( 'gmt_offset' ) * 3600 ) ); |
14 | 14 | $this->assertEquals( mysql_to_rfc3339( $post_date_gmt ), $data['date_gmt'] ); |
15 | 15 | } else { |
16 | 16 | $this->assertEquals( mysql_to_rfc3339( $post->post_date_gmt ), $data['date_gmt'] ); |
… |
… |
|
18 | 18 | $this->assertEquals( mysql_to_rfc3339( $post->post_date ), $data['date'] ); |
19 | 19 | |
20 | 20 | if ( '0000-00-00 00:00:00' === $post->post_modified_gmt ) { |
21 | | $post_modified_gmt = date( 'Y-m-d H:i:s', strtotime( $post->post_modified ) - ( get_option( 'gmt_offset' ) * 3600 ) ); |
| 21 | $post_modified_gmt = gmdate( 'Y-m-d H:i:s', strtotime( $post->post_modified ) - ( get_option( 'gmt_offset' ) * 3600 ) ); |
22 | 22 | $this->assertEquals( mysql_to_rfc3339( $post_modified_gmt ), $data['modified_gmt'] ); |
23 | 23 | } else { |
24 | 24 | $this->assertEquals( mysql_to_rfc3339( $post->post_modified_gmt ), $data['modified_gmt'] ); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
1428 | 1428 | function test_wp_calculate_image_srcset() { |
1429 | 1429 | $_wp_additional_image_sizes = wp_get_additional_image_sizes(); |
1430 | 1430 | |
1431 | | $year_month = date( 'Y/m' ); |
| 1431 | $year_month = gmdate( 'Y/m' ); |
1432 | 1432 | $image_meta = wp_get_attachment_metadata( self::$large_id ); |
1433 | 1433 | $uploads_dir_url = 'http://' . WP_TESTS_DOMAIN . '/wp-content/uploads/'; |
1434 | 1434 | |
… |
… |
|
1550 | 1550 | function test_wp_calculate_image_srcset_with_absolute_path_in_meta() { |
1551 | 1551 | $_wp_additional_image_sizes = wp_get_additional_image_sizes(); |
1552 | 1552 | |
1553 | | $year_month = date( 'Y/m' ); |
| 1553 | $year_month = gmdate( 'Y/m' ); |
1554 | 1554 | $image_meta = wp_get_attachment_metadata( self::$large_id ); |
1555 | 1555 | $uploads_dir_url = 'http://' . WP_TESTS_DOMAIN . '/wp-content/uploads/'; |
1556 | 1556 | |
… |
… |
|
1831 | 1831 | |
1832 | 1832 | $srcset = wp_get_attachment_image_srcset( self::$large_id, $size_array, $image_meta ); |
1833 | 1833 | |
1834 | | $year_month = date( 'Y/m' ); |
| 1834 | $year_month = gmdate( 'Y/m' ); |
1835 | 1835 | $uploads_dir = 'http://' . WP_TESTS_DOMAIN . '/wp-content/uploads/'; |
1836 | 1836 | |
1837 | 1837 | // Set up test cases for all expected size names. |
… |
… |
|
2228 | 2228 | remove_all_filters( 'wp_calculate_image_sizes' ); |
2229 | 2229 | |
2230 | 2230 | $actual = wp_get_attachment_image( self::$large_id, 'testsize' ); |
2231 | | $year = date( 'Y' ); |
2232 | | $month = date( 'm' ); |
| 2231 | $year = gmdate( 'Y' ); |
| 2232 | $month = gmdate( 'm' ); |
2233 | 2233 | |
2234 | 2234 | $expected = '<img width="999" height="999" src="http://' . WP_TESTS_DOMAIN . '/wp-content/uploads/' . $year . '/' . $month . '/test-image-testsize-999x999.png"' . |
2235 | 2235 | ' class="attachment-testsize size-testsize" alt=""' . |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
207 | 207 | $b['month'] = $lucifer[5]; |
208 | 208 | $b['day'] = $lucifer[6]; |
209 | 209 | if (preg_match("/([0-9]{2}):([0-9]{2})/",$lucifer[7],$l2)) { |
210 | | $b['year'] = date("Y"); |
| 210 | $b['year'] = gmdate("Y"); |
211 | 211 | $b['hour'] = $l2[1]; |
212 | 212 | $b['minute'] = $l2[2]; |
213 | 213 | } else { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
598 | 598 | $struc['group'] = $this->group( $path . '/' . $entry ); |
599 | 599 | $struc['size'] = $this->size( $path . '/' . $entry ); |
600 | 600 | $struc['lastmodunix'] = $this->mtime( $path . '/' . $entry ); |
601 | | $struc['lastmod'] = date( 'M j', $struc['lastmodunix'] ); |
602 | | $struc['time'] = date( 'h:i:s', $struc['lastmodunix'] ); |
| 601 | $struc['lastmod'] = gmdate( 'M j', $struc['lastmodunix'] ); |
| 602 | $struc['time'] = gmdate( 'h:i:s', $struc['lastmodunix'] ); |
603 | 603 | $struc['type'] = $this->is_dir( $path . '/' . $entry ) ? 'd' : 'f'; |
604 | 604 | |
605 | 605 | if ( 'd' == $struc['type'] ) { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
2791 | 2791 | $this->assertEquals( $user->user_email, $data['email'] ); |
2792 | 2792 | $this->assertEquals( (object) $user->allcaps, $data['capabilities'] ); |
2793 | 2793 | $this->assertEquals( (object) $user->caps, $data['extra_capabilities'] ); |
2794 | | $this->assertEquals( date( 'c', strtotime( $user->user_registered ) ), $data['registered_date'] ); |
| 2794 | $this->assertEquals( gmdate( 'c', strtotime( $user->user_registered ) ), $data['registered_date'] ); |
2795 | 2795 | $this->assertEquals( $user->user_login, $data['username'] ); |
2796 | 2796 | $this->assertEquals( $user->roles, $data['roles'] ); |
2797 | 2797 | $this->assertEquals( get_user_locale( $user ), $data['locale'] ); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
744 | 744 | $struc['group'] = $this->group( $path . '/' . $entry ); |
745 | 745 | $struc['size'] = $this->size( $path . '/' . $entry ); |
746 | 746 | $struc['lastmodunix'] = $this->mtime( $path . '/' . $entry ); |
747 | | $struc['lastmod'] = date( 'M j', $struc['lastmodunix'] ); |
748 | | $struc['time'] = date( 'h:i:s', $struc['lastmodunix'] ); |
| 747 | $struc['lastmod'] = gmdate( 'M j', $struc['lastmodunix'] ); |
| 748 | $struc['time'] = gmdate( 'h:i:s', $struc['lastmodunix'] ); |
749 | 749 | $struc['type'] = $this->is_dir( $path . '/' . $entry ) ? 'd' : 'f'; |
750 | 750 | |
751 | 751 | if ( 'd' == $struc['type'] ) { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
2010 | 2010 | $this->assertEquals( 'draft', $data['status'] ); |
2011 | 2011 | $this->assertEquals( 'draft', $new_post->post_status ); |
2012 | 2012 | // Confirm dates are shimmed for gmt_offset |
2013 | | $post_modified_gmt = date( 'Y-m-d H:i:s', strtotime( $new_post->post_modified ) + ( get_option( 'gmt_offset' ) * 3600 ) ); |
2014 | | $post_date_gmt = date( 'Y-m-d H:i:s', strtotime( $new_post->post_date ) + ( get_option( 'gmt_offset' ) * 3600 ) ); |
| 2013 | $post_modified_gmt = gmdate( 'Y-m-d H:i:s', strtotime( $new_post->post_modified ) + ( get_option( 'gmt_offset' ) * 3600 ) ); |
| 2014 | $post_date_gmt = gmdate( 'Y-m-d H:i:s', strtotime( $new_post->post_date ) + ( get_option( 'gmt_offset' ) * 3600 ) ); |
2015 | 2015 | |
2016 | 2016 | $this->assertEquals( mysql_to_rfc3339( $post_modified_gmt ), $data['modified_gmt'] ); |
2017 | 2017 | $this->assertEquals( mysql_to_rfc3339( $post_date_gmt ), $data['date_gmt'] ); |
… |
… |
|
2736 | 2736 | $this->assertEquals( $new_content, $new_post->post_content ); |
2737 | 2737 | |
2738 | 2738 | // The modified date should equal the current time. |
2739 | | $this->assertEquals( date( 'Y-m-d', strtotime( mysql_to_rfc3339( $expected_modified ) ) ), date( 'Y-m-d', strtotime( $data['modified'] ) ) ); |
2740 | | $this->assertEquals( date( 'Y-m-d', strtotime( $expected_modified ) ), date( 'Y-m-d', strtotime( $new_post->post_modified ) ) ); |
| 2739 | $this->assertEquals( gmdate( 'Y-m-d', strtotime( mysql_to_rfc3339( $expected_modified ) ) ), gmdate( 'Y-m-d', strtotime( $data['modified'] ) ) ); |
| 2740 | $this->assertEquals( gmdate( 'Y-m-d', strtotime( $expected_modified ) ), gmdate( 'Y-m-d', strtotime( $new_post->post_modified ) ) ); |
2741 | 2741 | } |
2742 | 2742 | |
2743 | 2743 | /** |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
924 | 924 | // Timezone conversion needs to be handled differently between these two |
925 | 925 | // cases. |
926 | 926 | if ( ! $is_utc && ! $has_timezone ) { |
927 | | $local = date( 'Y-m-d H:i:s', $date ); |
| 927 | $local = gmdate( 'Y-m-d H:i:s', $date ); |
928 | 928 | $utc = get_gmt_from_date( $local ); |
929 | 929 | } else { |
930 | | $utc = date( 'Y-m-d H:i:s', $date ); |
| 930 | $utc = gmdate( 'Y-m-d H:i:s', $date ); |
931 | 931 | $local = get_date_from_gmt( $utc ); |
932 | 932 | } |
933 | 933 | |