[wp-trac] [WordPress Trac] #41782: Using date_query with 'before' in WP_Query returns wrong timezone
WordPress Trac
noreply at wordpress.org
Sat Sep 2 21:29:02 UTC 2017
#41782: Using date_query with 'before' in WP_Query returns wrong timezone
--------------------------+------------------------------
Reporter: Biranit | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Date/Time | Version: 4.8.1
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by birgire):
When I play with:
{{{
$obj = new WP_Date_Query();
echo $obj->build_mysql_datetime( $datetime = '2017-01-01 10:00' );
}}}
then {{{$datetime}}} becomes an array, within that method:
{{{
Array
(
[year] => 2017
[month] => 1
[day] => 1
[hour] => 10
[minute] => 0
)
}}}
But with
{{{
$obj = new WP_Date_Query();
echo $obj->build_mysql_datetime( $datetime = '2017-01-01 10:00:00' );
}}}
then {{{$datetime}}} remains a string.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41782#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list