Ok here’s what my investigation showed as far as how these layers of crazy bugs work:
- MWS takes the StartDate and EndDate, and ignores the timezone information (which in my case is always UTC).
- MWS then converts StartDate and EndDate to Pacific Time, on top of which they’re using Daylight Savings offsets.
- After erroneously converting to Pacific Time Daylight Savings adjusted, it then erroneously truncates the hour/time component entirely, turning it into a date time of midnight Pacific Time.
- Then it takes that midnight Pacific date time, and converts it back to UTC, and filters the “shipment-date”, which are all seemingly in UTC.
So to take a specific example of how this MWS bug functions, say you filter from 2018-02-28T08:00+00:00 to 2018-03-31T08-00+00:00. The StartDate gets converted to erroneous Pacific Time with a -8 daylight offset, so it becomes 2018-02-28T00:00. Because it’s March however, the EndDate gets a -7 daylight offset, so it becomes 2018-03-31T01:00. The UTC StartDate is then 2018-02-28T00:00 but the UTC EndDate gets rounded up to include all of 2018-03-31, so entries are returned up until 2018-03-31T23:59:59.
If the EndDate is 2018-03-31T07-00+00:00, then it becomes erroneously converted to 2018-03-31T00:00, and you lose out on getting every shipment-date in the 2018-03-31 day.