Meta Queries
-
Hi Everyone,
I don’t know if this is in the right place, but ill ask here. if it needs to go elsewhere then feel free to move it.
I have a custom meta box with a datepicker. The datepicker outputs 2013-01-17 10:00 in my database for an event that is 01-17-2013 at 10pm PST.
<?php
$eventlist = new WP_Query(array(
‘post_type’ => ‘events’,
‘posts_per_page’ => 5,
‘order’ => ‘asc’,
‘orderby’ => ‘meta_value’,
‘meta_key’ => ‘datetime’,
‘meta_query’ => array(
array(
‘key’ => ‘datetime’, // Check the start date field
‘value’ => date(“Y-m-d H:i:s”),
‘compare’ => ‘>=’,
‘type’ => ‘DATETIME’
)
),
)
); ?>The issue is, at 4pm PST the event disappears, leading me to believe somewhere it is thinking its UTC and making the post go bye bye. Where would i Find this issue and how can i solve it?
Thanks in advance
The topic ‘Meta Queries’ is closed to new replies.