`query()` calls `datetime.datetime.fromtimestamp` regardless of whether a date query is being done. Guard this with an if statement to avoid the unnecessary work.
`query()` calls `datetime.datetime.fromtimestamp` regardless of whether a date query is being done. Guard this with an if statement to avoid the unnecessary work.