Questions on search transactions

I am using indexer.search_transactions to query for the transactions related with some certain smart contract application. The question I met is the start_time and end_time conditions are not fufilled.

For example, I create an application at 23:00 on 04/21 in UTC -5 time zone, and opt-in 5 acccounts into the smart contract before 23:30 in the same day. Then, at 23:40 I use indexer.search_transactions(start_time=“2021-04-22T02:00:00.00-05:00”) to query for the transactions starting from 02:00 on tommorrow.

What I expect is no returning results, but what I received is all 6 transactions described above. That is weird.

It seems the results filtered by time conditions are not accurate enough… Why does it happen?

Can you checked the timestamp of the returned transactions?
This is the field round-time of the transaction: indexer - Algorand Developer Portal

Can you do it with non-sensitive transactions on TestNet and post your minimum code having the issue as well as the transaction IDs?

Thanks for your reply @fabrice

The round-time you mentioned is an integer value stored in the transaction entities returned by the function search_transactions. I am not sure about the meaning of round-time here, could you explain that?

round-time is a UNIX timestamp.
You can convert it to a date using (assuming the timestamp is 1619299805)

  • on macOS:
    date -r 1619299805
    
  • on Linux:
    date -d @1619299805
    

You may also be hitting this issue: Query parameters after-time and before-time for /v2/transactions always assume UTC even if a different timezone is specified · Issue #458 · algorand/indexer · GitHub