woocommerce / woocommerce-android

WooCommerce Android app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
275 stars 135 forks source link

Filtering orders by date range using the wrong timezone #12688

Open atorresveiga opened 2 hours ago

atorresveiga commented 2 hours ago

Describe the bug When filtering orders by date range, the app uses the local timezone and not the store (web) defined timezone.

To Reproduce Create several orders in a store with a different timezone than on the device. Try that the difference between the device and the store timezone is big enough that the store timezone is in the next day. For example, September 25th using the store timezone but September 24th on the device.

Steps to reproduce the behavior:

  1. Go to Orders
  2. Tap on Filters
  3. Tap on the Date range
  4. Tap on today
  5. Check that the filter displays orders from Today and Yesterday

Screenshots

https://github.com/user-attachments/assets/9241a33b-142a-40b3-add6-d6c40e39c11f

Expected behavior If the Today filter is applied, only today's orders are displayed. We should apply filters that consider the store timezone and not the device one.

Isolating the problem (mark completed items with an [x]):

Mobile Environment Please include:

dangermattic commented 2 hours ago

Thanks for reporting! 👍