public static function Tcbtdb($tcb1, $tcb2, &$tdb1, &$tdb2) {
    /* 1977 Jan 1 00:00:32.184 TT, as two-part JD */
    $t77td = DJM0 + DJM77;
    $t77tf = TTMTAI / DAYSEC;

    /* TDB (days) at TAI 1977 Jan 1.0 */
    $tdb0 = TDB0 / DAYSEC;

    $d;

    /* Result, safeguarding precision. */
    if ($tcb1 > $tcb2) {
      $d    = $tcb1 - $t77td;
      $tdb1 = $tcb1;
      $tdb2 = $tcb2 + $tdb0 - ( $d + ( $tcb2 - $t77tf ) ) * ELB;
    }
    else {
      $d    = $tcb2 - $t77td;
      $tdb1 = $tcb1 + $tdb0 - ( $d + ( $tcb1 - $t77tf ) ) * ELB;
      $tdb2 = $tcb2;
    }

    /* Status (always OK). */
    return 0;
  }