Changeset 42736 for trunk/ippMonitor/raw/ipp.php
- Timestamp:
- Nov 25, 2024, 3:50:12 PM (20 months ago)
- File:
-
- 1 edited
-
trunk/ippMonitor/raw/ipp.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/raw/ipp.php
r42384 r42736 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.
