diff options
author | Ed Tanous <edtanous@google.com> | 2022-08-04 00:22:34 +0300 |
---|---|---|
committer | Ed Tanous <edtanous@google.com> | 2022-08-15 18:06:22 +0300 |
commit | 2b82937ecef572954b49569177b16831cbc09cfe (patch) | |
tree | aa26e2904cbaed410dc333c9991c436e143023a6 /redfish-core/lib/task.hpp | |
parent | 1e5b7c8892238b5d17c269bfa0ecdaf60825e801 (diff) | |
download | bmcweb-2b82937ecef572954b49569177b16831cbc09cfe.tar.xz |
Move time utils to be in one place
We've accumulated several time utility functions in the http classes.
Time isn't a core HTTP primitive, so http is not where those functions
below.
This commit moves all the time functions from the crow::utility
namespace into the redfish::time_utils namespace, as well as moves the
unit tests.
No code changes where made to the individual functions, with the
exception of changing the namespace on the unit tests.
Tested: Unit tests pass.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I8493375f60aea31899c84ae703e0f71a17dbdb73
Diffstat (limited to 'redfish-core/lib/task.hpp')
-rw-r--r-- | redfish-core/lib/task.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/redfish-core/lib/task.hpp b/redfish-core/lib/task.hpp index 7d96e42e62..be48a5b05e 100644 --- a/redfish-core/lib/task.hpp +++ b/redfish-core/lib/task.hpp @@ -395,11 +395,11 @@ inline void requestRoutesTask(App& app) asyncResp->res.jsonValue["Name"] = "Task " + strParam; asyncResp->res.jsonValue["TaskState"] = ptr->state; asyncResp->res.jsonValue["StartTime"] = - crow::utility::getDateTimeStdtime(ptr->startTime); + redfish::time_utils::getDateTimeStdtime(ptr->startTime); if (ptr->endTime) { asyncResp->res.jsonValue["EndTime"] = - crow::utility::getDateTimeStdtime(*(ptr->endTime)); + redfish::time_utils::getDateTimeStdtime(*(ptr->endTime)); } asyncResp->res.jsonValue["TaskStatus"] = ptr->status; asyncResp->res.jsonValue["Messages"] = ptr->messages; @@ -473,7 +473,7 @@ inline void requestRoutesTaskService(App& app) asyncResp->res.jsonValue["Name"] = "Task Service"; asyncResp->res.jsonValue["Id"] = "TaskService"; asyncResp->res.jsonValue["DateTime"] = - crow::utility::getDateTimeOffsetNow().first; + redfish::time_utils::getDateTimeOffsetNow().first; asyncResp->res.jsonValue["CompletedTaskOverWritePolicy"] = "Oldest"; asyncResp->res.jsonValue["LifeCycleEventOnTaskStateChange"] = true; |