- Timestamp:
- Dec 6, 2024, 1:27:11 PM (20 months ago)
- Location:
- branches/eam_branches/ipp-20230313/ippMonitor
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
raw/ipp.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20230313/ippMonitor
- Property svn:mergeinfo changed
/trunk/ippMonitor (added) merged: 42736
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20230313/ippMonitor/raw/ipp.php
r42571 r42751 958 958 } 959 959 960 function 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 960 986 ?>
Note:
See TracChangeset
for help on using the changeset viewer.
