Modified how the time for reminder is calculated