Thanks very kindly, jkat54! To clarify, I'm running this query against the REST API.
It seems that I may have to abandon using earliest and latest in the query, from that link and some of the others I saw. I was hoping this wasn't the case - users directly enter values such as "-1h" in our interface, but we can convert those to seconds.
I'll give it a shot and see if it'll work - I'll hold off on accepting to give others a chance for a little bit. Thanks!