Very simply put, I have a query:
@current_user.items.where('updated_at > ? AND updated_at < ?', last_sync_time_from_client, current_time)
My problem is, I think the time being compared in the database and the last_sync_time_from_client
are being compared on a float basis. This always results in the updated_at > last_sync_time_from_client
being true even when the time is identical to the second.
I.e.
(db item)updated_at.to_f # 1541246811.022979
last_sync_time.to_f # 1541246811.0
This means that the times, which are the same down to the second, will return oddities. Is there a way to fix this, or should I simply add a second to the last_sync_time_from_client to account for Rails being strange here?