I'm not sure what the name of the file is from the above. If it's whatever is in the TMPREPFILE variable with ".1" added to the end then use :
If you don't show what the variable $TMPREPFILE contains then we won't know if the variables day and time are set correctly. It is best to just do one small thing at a time when changing unix shell scripts and, if anything doesn't work, to just echo out the values of all the variables concerned.
Basically the value of $day and $time are not expanding on the fly - as we expect they should in a shell.
So the first thing that you check is he environment where you make the assignment to TEMPREP... If this is all right, then next I would try `echo $day` (enclosed in back-quotes / back ticks) to make the variable.