function alignPDT(details, lastDetails) {
  // This check protects the unsafe "!" usage below for null program date time access.
  if (!lastDetails.fragments.length || !details.hasProgramDateTime || !lastDetails.hasProgramDateTime) {
    return;
  } // if last level sliding is 1000 and its first frag PROGRAM-DATE-TIME is 2017-08-20 1:10:00 AM
  // and if new details first frag PROGRAM DATE-TIME is 2017-08-20 1:10:08 AM
  // then we can deduce that playlist B sliding is 1000+8 = 1008s


  var lastPDT = lastDetails.fragments[0].programDateTime; // hasProgramDateTime check above makes this safe.

  var newPDT = details.fragments[0].programDateTime; // date diff is in ms. frag.start is in seconds

  var sliding = (newPDT - lastPDT) / 1000 + lastDetails.fragments[0].start;

  if (sliding && Object(_home_runner_work_hls_js_hls_js_src_polyfills_number__WEBPACK_IMPORTED_MODULE_0__["isFiniteNumber"])(sliding)) {
    _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].log("Adjusting PTS using programDateTime delta " + (newPDT - lastPDT) + "ms, sliding:" + sliding.toFixed(3) + " " + details.url + " ");
    adjustSlidingStart(sliding, details);
  }
}
Computes the PTS of a new level's fragments using the difference in Program Date Time from the last level.
@param details - The details of the new level
@param lastDetails - The details of the last loaded level