Jeff Evans - 2015-08-11

I've seen this behaivor too and it's very annoying. There appear to be two problems: I cannot see last night's data (the max end date is two nights ago intead of last night), and the graph's displayed date range does not match the date range ui controls.

For example, it is 8/11/15 and I have imported data from last night. When I select Last Week, the Start date is set to 8/4/15 and the end date is set to 8/10/15. The graph, however, displays 8/3/15 to 8/9/15.

I believe one issue is related to time zones. QT 5 changed the way fromMSecsSinceEpoch works to return data in the local time zone instead of UTC, as it did in QT 4. I am in Central Time which is currently in DST, so its UTC offset is -5. Since the start date of the graph is set to 12 AM on the selected start date (technically 12:10am for some reason but that's not important now), when the graph axis is drawn, it uses 7pm on the previous day to create the day string.

The second problem is that I cannot see last night's data. Even with the time zone fix, the start and end date controls only display 8/4 through 8/10, but the data rendered in the graph is 8/3 through 8/9. I believe this is also related to the QT api change above, as SH converts to and from milliseconds internally between various parts of the application. I'm updating all calls (except UI display calls) to fromMSecsSinceEpoch to also specify UTC to ensure the app is internally consitent wrt time zones.

I'm working on fixes for these issues and will send a PR when it's ready.