I have a query in mysql which compares 2 dates like this
convert_tz(updatedDate,\'+05:30\',\'-05:00\') < ?
the convert function returns
Without seeing the values that are matching on the second query and not on the first, it's hard to be absolutely certain. But one thing to keep in mind is that a time zone is not the same as an offset. Please read "TimeZone != Offset" section of the TimeZone tag wiki.
For example, you say you are converting to the America/New_York
time zone. This zone is sometimes in UTC-05:00 (for Eastern Standard Time), and sometimes in UTC-04:00 (for Eastern Daylight Time). It is entirely possible that some of your data is being picked up because of the -4 offset in effect during daylight savings time.
When you hardcode to the -5 offset, you are not taking any time zone rules into consideration. Which would explain the discrepancy.