pldm: Moving utils function into the common directory

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I4fbd0da4bc6f27e9a9ed711962bd8737d8b55ebf
diff --git a/libpldmresponder/bios.cpp b/libpldmresponder/bios.cpp
index d815ce4..6776038 100644
--- a/libpldmresponder/bios.cpp
+++ b/libpldmresponder/bios.cpp
@@ -1,6 +1,6 @@
 #include "bios.hpp"
 
-#include "libpldmresponder/utils.hpp"
+#include "utils.hpp"
 #include "xyz/openbmc_project/Common/error.hpp"
 
 #include <array>
@@ -48,14 +48,15 @@
     auto t = time_t(timeSec);
     auto time = localtime(&t);
 
-    seconds = decimalToBcd(time->tm_sec);
-    minutes = decimalToBcd(time->tm_min);
-    hours = decimalToBcd(time->tm_hour);
-    day = decimalToBcd(time->tm_mday);
-    month =
-        decimalToBcd(time->tm_mon + 1); // The number of months in the range
-                                        // 0 to 11.PLDM expects range 1 to 12
-    year = decimalToBcd(time->tm_year + 1900); // The number of years since 1900
+    seconds = pldm::utils::decimalToBcd(time->tm_sec);
+    minutes = pldm::utils::decimalToBcd(time->tm_min);
+    hours = pldm::utils::decimalToBcd(time->tm_hour);
+    day = pldm::utils::decimalToBcd(time->tm_mday);
+    month = pldm::utils::decimalToBcd(time->tm_mon +
+                                      1); // The number of months in the range
+                                          // 0 to 11.PLDM expects range 1 to 12
+    year = pldm::utils::decimalToBcd(time->tm_year +
+                                     1900); // The number of years since 1900
 }
 
 size_t getTableTotalsize(size_t sizeWithoutPad)
@@ -126,7 +127,9 @@
     auto bus = sdbusplus::bus::new_default();
     try
     {
-        auto service = getService(bus, hostTimePath, timeInterface);
+
+        auto service =
+            pldm::utils::getService(bus, hostTimePath, timeInterface);
 
         auto method = bus.new_method_call(service.c_str(), hostTimePath,
                                           dbusProperties, "Get");