emoncms/emoncms — pull request #213 by CapnBry (2014-06-09 18:25:29+00:00)
Title: Fix 'Use today' kwh in myelectric for mysql timeseries engine

I tried to make a post about it on the forums [Issues with MyElectric](http://openenergymonitor.org/emon/node/4887) thread but it went off to the moderation gods. This patch resolves one of the issues reported where 'Use today' reports data for the leftmost bar instead of the rightmost.

The long and the short is myelectric expects the feed data to be in time order, as other engines are. However, mysqltimestore feeds are mostly unsorted and the one that is is sorted descending. This patch adjust the sort order so they are all ascending. I don't think any other bit of code relies on the order of feed data being descending.