public static function Tttcg($tt1, $tt2, &$tcg1, &$tcg2) {
    /* 1977 Jan 1 00:00:32.184 TT, as MJD */
    $t77t = DJM77 + TTMTAI / DAYSEC;

    /* TT to TCG rate */
    $elgg = ELG / (1.0 - ELG);

    /* Result, safeguarding precision. */
    if ($tt1 > $tt2) {
      $tcg1 = $tt1;
      $tcg2 = $tt2 + ( ( $tt1 - DJM0 ) + ( $tt2 - $t77t ) ) * $elgg;
    }
    else {
      $tcg1 = $tt1 + ( ( $tt2 - DJM0 ) + ( $tt1 - $t77t ) ) * $elgg;
      $tcg2 = $tt2;
    }

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