I am trying to compare datetimes accurately in a Rails 4 API serving JSON. When sending dates in rfc3339 format to the API like this
"2015-05-06T21:16:43.611-0400"
the comparisons don't work properly because Rails 4 compares datetimes with microsecond precision whereas dates are sent with milliseconds precision
Is there a way to "limit" the comparison to milliseconds when doing something like
object.created_at > '2015-05-06T21:16:43.611-0400'