diff --git a/Redfish.md b/Redfish.md
index 3bb95ca..29b6b87 100644
--- a/Redfish.md
+++ b/Redfish.md
@@ -521,6 +521,12 @@
 - Created
 - EntryType
 
+### /redfish/v1/Managers/bmc/ManagerDiagnosticData/
+
+#### ManagerDiagnosticData
+
+- ServiceRootUptimeSeconds
+
 ### /redfish/v1/Managers/bmc/NetworkProtocol/
 
 #### ManagerNetworkProtocol
diff --git a/redfish-core/lib/manager_diagnostic_data.hpp b/redfish-core/lib/manager_diagnostic_data.hpp
index 66fc661..14b75fe 100644
--- a/redfish-core/lib/manager_diagnostic_data.hpp
+++ b/redfish-core/lib/manager_diagnostic_data.hpp
@@ -9,12 +9,59 @@
 #include "routing.hpp"
 
 #include <nlohmann/json.hpp>
+#include <sdbusplus/asio/property.hpp>
 
 #include <string>
 
 namespace redfish
 {
 
+inline void
+    afterGetManagerStartTime(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
+                             const boost::system::error_code& ec,
+                             uint64_t bmcwebResetTime)
+{
+    if (ec)
+    {
+        // Not all servers will be running in systemd, so ignore the error.
+        return;
+    }
+    using std::chrono::steady_clock;
+
+    std::chrono::duration<steady_clock::rep, std::micro> usReset{
+        bmcwebResetTime};
+    steady_clock::time_point resetTime{usReset};
+
+    steady_clock::time_point now = steady_clock::now();
+
+    steady_clock::duration runTime = now - resetTime;
+
+    if (runTime < steady_clock::duration::zero())
+    {
+        BMCWEB_LOG_CRITICAL << "Uptime was negative????";
+        messages::internalError(aResp->res);
+        return;
+    }
+
+    // Floor to the closest millisecond
+    using Milli = std::chrono::duration<steady_clock::rep, std::milli>;
+    Milli milli = std::chrono::floor<Milli>(runTime);
+
+    using SecondsFloat = std::chrono::duration<double>;
+    SecondsFloat sec = std::chrono::duration_cast<SecondsFloat>(milli);
+
+    aResp->res.jsonValue["ServiceRootUptimeSeconds"] = sec.count();
+}
+
+inline void
+    managerGetServiceRootUptime(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
+{
+    sdbusplus::asio::getProperty<uint64_t>(
+        *crow::connections::systemBus, "org.freedesktop.systemd1",
+        "/org/freedesktop/systemd1/unit/bmcweb_2eservice",
+        "org.freedesktop.systemd1.Unit", "ActiveEnterTimestampMonotonic",
+        std::bind_front(afterGetManagerStartTime, aResp));
+}
 /**
  * handleManagerDiagnosticData supports ManagerDiagnosticData.
  * It retrieves BMC health information from various DBus resources and returns
@@ -29,11 +76,13 @@
         return;
     }
     asyncResp->res.jsonValue["@odata.type"] =
-        "#ManagerDiagnosticData.v1_0_0.ManagerDiagnosticData";
+        "#ManagerDiagnosticData.v1_2_0.ManagerDiagnosticData";
     asyncResp->res.jsonValue["@odata.id"] =
         "/redfish/v1/Managers/bmc/ManagerDiagnosticData";
     asyncResp->res.jsonValue["Id"] = "ManagerDiagnosticData";
     asyncResp->res.jsonValue["Name"] = "Manager Diagnostic Data";
+
+    managerGetServiceRootUptime(asyncResp);
 }
 
 inline void requestRoutesManagerDiagnosticData(App& app)
