IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 6, 2024, 1:27:11 PM (20 months ago)
Author:
eugene
Message:

merge from trunk: ippMonitor updates

Location:
branches/eam_branches/ipp-20230313/ippMonitor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20230313/ippMonitor

  • branches/eam_branches/ipp-20230313/ippMonitor/raw/ipp.php

    r42571 r42751  
    958958}
    959959
     960function getMJD() {
     961    // Get the current date and time in UTC as a Unix timestamp
     962    $currentTimestamp = time();
     963   
     964    // Convert the Unix timestamp to Julian Date (JD)
     965    $jd = 2440587.5 + ($currentTimestamp / 86400);
     966   
     967    // Calculate the Modified Julian Date (MJD)
     968    $mjd = $jd - 2400000.5;
     969    $mjdDay = floor($mjd); // Get only the day part of MJD
     970   
     971    // Concatenate the desired string for expname
     972    //$expname = "o" . $mjdDay . "%";
     973   
     974    // Format the current date in 'YYYY-MM-DD-HH:mm:ss' for display
     975    //$currentUTC = gmdate('Y-m-d-H:i:s', $currentTimestamp);
     976   
     977    // Display the result
     978    //echo "Current UTC: $currentUTC, MJD: $mjdDay, expname: $expname<br>";
     979   
     980    // Return MJD day as an integer
     981    return $mjdDay;
     982}
     983
     984
     985
    960986?>
Note: See TracChangeset for help on using the changeset viewer.