I have a custom field that holds a unix timestamp, and I've verified that the data in it is proper.
In my code I'm trying to compare that timestamp against $now, where $now is php's time(); $now is also holding valid data.
I wanted to get posts where $now is less than my field. I'm using this:
$args = array(
'post_type' => 'closings'
,'posts_per_page' => 1000
,'meta_query' => array(
'key' => 'date_time',
'value' => $now,
'compare' => '<=',
'type' => 'NUMERIC'
I'm not getting any results out of it. I tried with DATETIME instead of NUMERIC, and I tried reversing my comparison operator.
The docs aren't clear how the comparison values are ordered. For my code above is it saying 'date_time <= $now' or '$now <= date_time' ?
Am I using the wrong type?