code: function tsToObj(ts, offset) {
    ts += offset * 60 * 1000;
  
    const d = new Date(ts);
  
    return {
      year: d.getUTCFullYear(),
      month: d.getUTCMonth() + 1,
      day: d.getUTCDate(),
      hour: d.getUTCHours(),
      minute: d.getUTCMinutes(),
      second: d.getUTCSeconds(),
      millisecond: d.getUTCMilliseconds()
    };
  }
docs: convert an epoch timestamp into a calendar object with the given offset