add calculation for nearest half hour