Fix last_hour out of bounds.
Add utils method for time conversion.
Merge pull request #75 from 4teamwork/merge_fix_last_hour_out_of_bounds

Fix last hour out of bounds.