iobridge/thingspeak — Issue #1: Error displaying charts for certain timescales
Author: akinsgre
Created: 2012-01-25 15:21:15+00:00
State: open

When displaying a chart with a certain timescales, an exception is raised in the logs and the charts don't display

There is a gist here https://gist.github.com/1676729 which shows the logging output (including some additional logging in my fork that shows why the issue occurs)

I think the code should be written such that the timeslices is equal to the start_time - end_time [ ie, timeslices = Array.new(((start_time - end_time) / seconds).floor) ] because the start_time is the feeds.first.created_at which is the most recent feed having the greater absolute time value.