Build RRD up to and including the "to" time.

To not include means an analysis "up to" midnight does not include the
hour before midnight.
Fix import.