Fixed bug occuring when reference time had an exact time of day