lib/gtfs/realtime/stop_time.rb in gtfs-realtime-0.2.2 vs lib/gtfs/realtime/stop_time.rb in gtfs-realtime-0.2.3
- old
+ new
@@ -41,10 +41,10 @@
# TODO: handle case where date != Date.today
day_adjustment = 0
hour = time[0...2].to_i
# handle timestamps like "24:30"
- if hour > 24
+ if hour >= 24
days = hour / 24
time[0...2] = (hour % 24).to_s.rjust(2, '0')
end
Time.parse(time) + day_adjustment * 60 * 60 * 24