Changeset 34989
- Timestamp:
- 10/09/2015 04:32:59 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/date.php
r33803 r34989 993 993 994 994 // Hour 995 if ( $hour ) {995 if ( null !== $hour ) { 996 996 $format .= '%H.'; 997 997 $time .= sprintf( '%02d', $hour ) . '.'; -
trunk/tests/phpunit/tests/date/query.php
r31251 r34989 509 509 } 510 510 511 /** 512 * @ticket 34228 513 */ 514 public function test_build_time_query_should_not_discard_hour_0() { 515 $q = new WP_Date_Query( array() ); 516 517 $found = $q->build_time_query( 'post_date', '=', 0, 10 ); 518 519 $this->assertContains( '%H', $found ); 520 } 521 511 522 public function test_build_time_query_compare_in() { 512 523 $q = new WP_Date_Query( array() ); -
trunk/tests/phpunit/tests/query/dateQuery.php
r30142 r34989 664 664 ), 665 665 ), 666 ) ); 667 668 $this->assertEquals( array( $p1 ), wp_list_pluck( $posts, 'ID' ) ); 669 } 670 671 /** 672 * @ticket 34228 673 */ 674 public function test_date_query_hour_should_not_ignore_0() { 675 return; 676 $p1 = $this->factory->post->create( array( 'post_date' => '2014-10-21 00:42:29', ) ); 677 $p2 = $this->factory->post->create( array( 'post_date' => '2014-10-21 01:42:29', ) ); 678 679 $posts = $this->_get_query_result( array( 680 'year' => 2014, 681 'monthnum' => 10, 682 'day' => 21, 683 'hour' => 0, 684 'minute' => 42, 666 685 ) ); 667 686
Note: See TracChangeset
for help on using the changeset viewer.