Updated code to better handle a user schedule that has "gaps" in time keys.