function toMs (num) {
  if (num < 31557600000) return num * 1000;
  return num;
}
If the number passed val is seconds from the epoch, turn it into milliseconds.
Milliseconds would be greater than 31557600000 (December 31, 1970).

@param {Number} num