Better practice to find the max/min element in a loop
Enumerable has many useful methods that solve problems like this. In this case you want map and min or min_by:

closest_trigger_utc_time = following_triggers.map{|test| test.utc_time}.min


2**(0.size * 8 -2) -1 is a bad way to write infinity. If you must have an infinity value, use Float::INFINITY instead, but it's better to avoid this. min returns nil for empty input, so it's convenient to use that as the default value, or replace it with something else by closest_trigger_utc_time || some_meaningful_default.