Changed aroundtime to a time window (feature #1400)

@ProfYaffle & @adamsutton I rebased and cleaned up my version of the patch as discussed in the old pull request.
This code needs to somehow deal, properly (not like old code), with the case where the user doesn't want to set the time.