Fix bug in last/first hour of a day data storage that mixed collected data over the two days and stored false first and last visit time.