From a371d20f1d0a3e14d4ac1614c1a60e2fbb9d2698 Mon Sep 17 00:00:00 2001 From: Yoshie Muranaka Date: Mon, 13 Apr 2020 10:42:09 -0700 Subject: Update BMC time to use redfish Change getBmcTime call from D-Bus to redfish endpoint in GlobalStore module. Signed-off-by: Yoshie Muranaka Change-Id: I3c459d6bf40a778d5e03d112c12e45ad8554c141 --- src/store/modules/GlobalStore.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/store/modules/GlobalStore.js b/src/store/modules/GlobalStore.js index 6511a45a..057f5158 100644 --- a/src/store/modules/GlobalStore.js +++ b/src/store/modules/GlobalStore.js @@ -51,11 +51,10 @@ const GlobalStore = { }, getBmcTime({ commit }) { api - .get('/xyz/openbmc_project/time/bmc') + .get('/redfish/v1/Managers/bmc') .then(response => { - // bmcTime is stored in microseconds, convert to milliseconds - const bmcEpochTime = response.data.data.Elapsed / 1000; - const date = new Date(bmcEpochTime); + const bmcDateTime = response.data.DateTime; + const date = new Date(bmcDateTime); commit('setBmcTime', date); }) .catch(error => console.log(error)); -- cgit v1.2.3