The time command sets or mutates the fulltime which is the "day" time or the time used to calculate the sky progress/moon, etc. It is also the time that is frozen if the daylight cycle gamerule is set to false.
EDIT: actually it looks like setTime also calls setFullTime behind the scenes with some calculation done since its a relative number. So I think either one can be used, but used in different ways.