summaryrefslogtreecommitdiff
path: root/redfish-core/lib/task.hpp
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-08-04 00:22:34 +0300
committerEd Tanous <edtanous@google.com>2022-08-15 18:06:22 +0300
commit2b82937ecef572954b49569177b16831cbc09cfe (patch)
treeaa26e2904cbaed410dc333c9991c436e143023a6 /redfish-core/lib/task.hpp
parent1e5b7c8892238b5d17c269bfa0ecdaf60825e801 (diff)
downloadbmcweb-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.hpp6
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;