Why using time for doing ranges?
Converting the id from hex, and treating it like a regular integer would make more sense to me