I have a strange issue. I want to retrieve products under woocommerce using dates_are_gmt. I pass a date and dates_are_gmt=true but this flag is ignored. For example I pass this date “modified_after=2023-04-12T14:39:01″ and woocommerce retrieve products modified before this date. For example retrieve a product with this gmt modified date: date_modified_gmt:”2023-04-12T13:06:43”
I have also tried with dates_are_gmt=1 with the same result
I understand that you’re experiencing an issue with retrieving products using the dates_are_gmt parameter.
Based on the information you’ve provided, it seems that the dates_are_gmt flag is not working as expected when you pass the modified_after parameter, correct?
As a first step, please ensure that you are using the latest versions of WooCommerce and WooCommerce REST API.
Then, can you please share as well the API request you are using for us to check this further?
This is the call I made (just obfuscated keys) /wp-json/wc/v3/products/?consumer_key=ck_xxx&consumer_secret=cs_xxx&modified_after=2023-04-13T18:35:02&status=publish&order=asc&per_page=100&dates_are_gmt=1
The first prodct showed hae a modified gmt date 2023-04-13T18:34:32, BEFORE the date I request
This is the time setup (on all woocommerce I manage):