diff --git a/.gitignore b/.gitignore
index bdc08da..26a8d6d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -62,4 +62,5 @@
 /test/*.gcno
 /test/libpldm_base_test
 /test/libpldmresponder_base_test
-
+/test/libpldm_bios_test
+/test/libpldmresponder_bios_formatTime_test
diff --git a/configure.ac b/configure.ac
index e7b9f44..23e07ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,6 +41,8 @@
     [AM_CONDITIONAL(AUTOCONF_CODE_COVERAGE_2019_01_06, [false])])
 AX_ADD_AM_MACRO_STATIC([])
 
+AX_PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus])
+
 # Check/set gtest specific functions.
 AX_PTHREAD([GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=1"],[GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=0"])
 AC_SUBST(GTEST_CPPFLAGS)
diff --git a/libpldm/Makefile.am b/libpldm/Makefile.am
index e778094..821f390 100644
--- a/libpldm/Makefile.am
+++ b/libpldm/Makefile.am
@@ -1,13 +1,15 @@
 nobase_include_HEADERS = \
 	base.h \
 	pldm_types.h \
-	platform.h
+	platform.h \
+	bios.h
 
 libpldm_LTLIBRARIES = libpldm.la
 libpldmdir = ${libdir}
 libpldm_la_SOURCES = \
 	base.c \
-	platform.c
+	platform.c \
+	bios.c
 libpldm_la_LDFLAGS = -version-info 1:0:0 -shared
 libpldm_la_CFLAGS = $(CODE_COVERAGE_CFLAGS)
 libpldm_la_LIBADD = $(CODE_COVERAGE_LIBS)
diff --git a/libpldm/base.h b/libpldm/base.h
index 3673e9f..77b1045 100644
--- a/libpldm/base.h
+++ b/libpldm/base.h
@@ -16,6 +16,7 @@
 enum pldm_supported_types {
 	PLDM_BASE = 0x00,
 	PLDM_PLATFORM = 0x02,
+	PLDM_BIOS = 0x03,
 };
 
 /** @brief PLDM Commands
diff --git a/libpldm/bios.c b/libpldm/bios.c
new file mode 100644
index 0000000..c757df3
--- /dev/null
+++ b/libpldm/bios.c
@@ -0,0 +1,88 @@
+#include <endian.h>
+#include <string.h>
+
+#include "bios.h"
+
+int encode_get_date_time_req(uint8_t instance_id, struct pldm_msg *msg)
+{
+	struct pldm_header_info header = {0};
+
+	if (msg == NULL) {
+		return PLDM_ERROR_INVALID_DATA;
+	}
+
+	header.msg_type = PLDM_REQUEST;
+	header.instance = instance_id;
+	header.pldm_type = PLDM_BIOS;
+	header.command = PLDM_GET_DATE_TIME;
+	return pack_pldm_header(&header, &(msg->hdr));
+}
+
+int encode_get_date_time_resp(uint8_t instance_id, uint8_t completion_code,
+			      uint8_t seconds, uint8_t minutes, uint8_t hours,
+			      uint8_t day, uint8_t month, uint16_t year,
+			      struct pldm_msg *msg)
+{
+	struct pldm_header_info header = {0};
+	int rc = PLDM_SUCCESS;
+
+	if (msg == NULL) {
+		return PLDM_ERROR_INVALID_DATA;
+	}
+
+	msg->body.payload[0] = completion_code;
+
+	header.msg_type = PLDM_RESPONSE;
+	header.instance = instance_id;
+	header.pldm_type = PLDM_BIOS;
+	header.command = PLDM_GET_DATE_TIME;
+	if ((rc = pack_pldm_header(&header, &(msg->hdr))) > PLDM_SUCCESS) {
+		return rc;
+	}
+
+	uint8_t *dst = msg->body.payload + sizeof(msg->body.payload[0]);
+
+	memcpy(dst, &seconds, sizeof(seconds));
+	dst += sizeof(seconds);
+	memcpy(dst, &minutes, sizeof(minutes));
+	dst += sizeof(minutes);
+	memcpy(dst, &hours, sizeof(hours));
+	dst += sizeof(hours);
+	memcpy(dst, &day, sizeof(day));
+	dst += sizeof(day);
+	memcpy(dst, &month, sizeof(month));
+	dst += sizeof(month);
+	uint16_t local_year = htole16(year);
+	memcpy(dst, &local_year, sizeof(local_year));
+
+	return PLDM_SUCCESS;
+}
+
+int decode_get_date_time_resp(const struct pldm_msg_payload *msg,
+			      uint8_t *completion_code, uint8_t *seconds,
+			      uint8_t *minutes, uint8_t *hours, uint8_t *day,
+			      uint8_t *month, uint16_t *year)
+{
+	if (msg == NULL || seconds == NULL || minutes == NULL ||
+	    hours == NULL || day == NULL || month == NULL || year == NULL ||
+	    completion_code == NULL) {
+		return PLDM_ERROR_INVALID_DATA;
+	}
+
+	*completion_code = msg->payload[0];
+	if (PLDM_SUCCESS != *completion_code) {
+		return PLDM_SUCCESS;
+	}
+	const uint8_t *start = msg->payload + sizeof(uint8_t);
+	*seconds = *start;
+	*minutes = *(start + sizeof(*seconds));
+	*hours = *(start + sizeof(*seconds) + sizeof(*minutes));
+	*day = *(start + sizeof(*seconds) + sizeof(*minutes) + sizeof(*hours));
+	*month = *(start + sizeof(*seconds) + sizeof(*minutes) +
+		   sizeof(*hours) + sizeof(*day));
+	*year = le16toh(
+	    *((uint16_t *)(start + sizeof(*seconds) + sizeof(*minutes) +
+			   sizeof(*hours) + sizeof(*day) + sizeof(*month))));
+
+	return PLDM_SUCCESS;
+}
diff --git a/libpldm/bios.h b/libpldm/bios.h
new file mode 100644
index 0000000..d173aeb
--- /dev/null
+++ b/libpldm/bios.h
@@ -0,0 +1,80 @@
+#ifndef BIOS_H
+#define BIOS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <asm/byteorder.h>
+#include <stddef.h>
+#include <stdint.h>
+
+#include "base.h"
+
+/* Response lengths are inclusive of completion code */
+#define PLDM_GET_DATE_TIME_RESP_BYTES 8
+
+enum pldm_bios_commands { PLDM_GET_DATE_TIME = 0x0c };
+
+/* Requester */
+
+/* GetDateTime */
+
+/** @brief Create a PLDM request message for GetDateTime
+ *
+ *  @param[in] instance_id - Message's instance id
+ *  @param[out] msg - Message will be written to this
+ *  @return pldm_completion_codes
+ *  @note  Caller is responsible for memory alloc and dealloc of param
+ *         'msg.body.payload'
+ */
+
+int encode_get_date_time_req(uint8_t instance_id, struct pldm_msg *msg);
+
+/** @brief Decode a GetDateTime response message
+ *
+ *  @param[in] msg - Response message payload
+ *  @param[out] completion_code - Pointer to response msg's PLDM completion code
+ *  @param[out] seconds - Seconds in BCD format
+ *  @param[out] minutes - minutes in BCD format
+ *  @param[out] hours - hours in BCD format
+ *  @param[out] day - day of month in BCD format
+ *  @param[out] month - number of month in BCD format
+ *  @param[out] year - year in BCD format
+ *  @return pldm_completion_codes
+ */
+int decode_get_date_time_resp(const struct pldm_msg_payload *msg,
+			      uint8_t *completion_code, uint8_t *seconds,
+			      uint8_t *minutes, uint8_t *hours, uint8_t *day,
+			      uint8_t *month, uint16_t *year);
+
+/* Responder */
+
+/* GetDateTime */
+
+/** @brief Create a PLDM response message for GetDateTime
+ *
+ *  @param[in] instance_id - Message's instance id
+ *  @param[in] completion_code - PLDM completion code
+ *  @param[in] seconds - seconds in BCD format
+ *  @param[in] minutes - minutes in BCD format
+ *  @param[in] hours - hours in BCD format
+ *  @param[in] day - day of the month in BCD format
+ *  @param[in] month - number of month in BCD format
+ *  @param[in] year - year in BCD format
+ *  @param[out] msg - Message will be written to this
+ *  @return pldm_completion_codes
+ *  @note  Caller is responsible for memory alloc and dealloc of param
+ *         'msg.body.payload'
+ */
+
+int encode_get_date_time_resp(uint8_t instance_id, uint8_t completion_code,
+			      uint8_t seconds, uint8_t minutes, uint8_t hours,
+			      uint8_t day, uint8_t month, uint16_t year,
+			      struct pldm_msg *msg);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BIOS_H */
diff --git a/libpldmresponder/Makefile.am b/libpldmresponder/Makefile.am
index a9b1507..faa4934 100644
--- a/libpldmresponder/Makefile.am
+++ b/libpldmresponder/Makefile.am
@@ -1,12 +1,18 @@
 libpldmresponder_LTLIBRARIES = libpldmresponder.la
 libpldmresponderdir = ${libdir}
 libpldmresponder_la_SOURCES = \
-	base.cpp
+	base.cpp \
+	utils.cpp \
+	bios.cpp
 libpldmresponder_la_LIBADD = \
 	../libpldm/libpldm.la \
 	$(CODE_COVERAGE_LIBS)
 libpldmresponder_la_LDFLAGS = \
+	$(SDBUSPLUS_LIBS)
 	-version-info 1:0:0 -shared
-libpldmresponder_la_CXXFLAGS = $(CODE_COVERAGE_CXXFLAGS)
+libpldmresponder_la_CXXFLAGS = $(CODE_COVERAGE_CXXFLAGS) \
+	$(SDBUSPLUS_CFLAGS)
+ 
 libpldmresponder_la_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
 
+
diff --git a/libpldmresponder/bios.cpp b/libpldmresponder/bios.cpp
new file mode 100644
index 0000000..dfd07b8
--- /dev/null
+++ b/libpldmresponder/bios.cpp
@@ -0,0 +1,99 @@
+#include "bios.hpp"
+
+#include "libpldmresponder/utils.hpp"
+#include "xyz/openbmc_project/Common/error.hpp"
+
+#include <array>
+#include <chrono>
+#include <ctime>
+#include <iostream>
+#include <phosphor-logging/elog-errors.hpp>
+#include <stdexcept>
+#include <string>
+#include <variant>
+#include <vector>
+
+namespace pldm
+{
+
+using namespace phosphor::logging;
+
+using EpochTimeUS = uint64_t;
+
+constexpr auto dbusProperties = "org.freedesktop.DBus.Properties";
+
+namespace responder
+{
+
+namespace utils
+{
+
+void epochToBCDTime(uint64_t timeSec, uint8_t& seconds, uint8_t& minutes,
+                    uint8_t& hours, uint8_t& day, uint8_t& month,
+                    uint16_t& year)
+{
+    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
+}
+
+} // namespace utils
+
+void getDateTime(const pldm_msg_payload* request, pldm_msg* response)
+{
+    uint8_t seconds = 0;
+    uint8_t minutes = 0;
+    uint8_t hours = 0;
+    uint8_t day = 0;
+    uint8_t month = 0;
+    uint16_t year = 0;
+
+    constexpr auto timeInterface = "xyz.openbmc_project.Time.EpochTime";
+    constexpr auto bmcTimePath = "/xyz/openbmc_project/time/bmc";
+    std::variant<EpochTimeUS> value;
+
+    auto bus = sdbusplus::bus::new_default();
+    try
+    {
+        auto service = getService(bus, bmcTimePath, timeInterface);
+
+        auto method = bus.new_method_call(service.c_str(), bmcTimePath,
+                                          dbusProperties, "Get");
+        method.append(timeInterface, "Elapsed");
+
+        auto reply = bus.call(method);
+        reply.read(value);
+    }
+
+    catch (std::exception& e)
+    {
+        log<level::ERR>("Error getting time", entry("PATH=%s", bmcTimePath),
+                        entry("TIME INTERACE=%s", timeInterface));
+
+        encode_get_date_time_resp(0, PLDM_ERROR, seconds, minutes, hours, day,
+                                  month, year, response);
+        return;
+    }
+
+    uint64_t timeUsec = std::get<EpochTimeUS>(value);
+
+    uint64_t timeSec = std::chrono::duration_cast<std::chrono::seconds>(
+                           std::chrono::microseconds(timeUsec))
+                           .count();
+
+    utils::epochToBCDTime(timeSec, seconds, minutes, hours, day, month, year);
+
+    encode_get_date_time_resp(0, PLDM_SUCCESS, seconds, minutes, hours, day,
+                              month, year, response);
+}
+
+} // namespace responder
+} // namespace pldm
diff --git a/libpldmresponder/bios.hpp b/libpldmresponder/bios.hpp
new file mode 100644
index 0000000..80a732b
--- /dev/null
+++ b/libpldmresponder/bios.hpp
@@ -0,0 +1,39 @@
+#pragma once
+
+#include <stdint.h>
+
+#include "libpldm/bios.h"
+
+namespace pldm
+{
+
+namespace responder
+{
+
+/** @brief Handler for GetDateTime
+ *
+ *  @param[in] request - Request message payload
+ *  @param[out] response - Response message written here
+ */
+void getDateTime(const pldm_msg_payload* request, pldm_msg* response);
+
+namespace utils
+{
+
+/** @brief Convert epoch time to BCD time
+ *
+ *  @param[in] timeSec - Time got from epoch time in seconds
+ *  @param[out] seconds - number of seconds in BCD
+ *  @param[out] minutes - number of minutes in BCD
+ *  @param[out] hours - number of hours in BCD
+ *  @param[out] day - day of the month in BCD
+ *  @param[out] month - month number in BCD
+ *  @param[out] year - year number in BCD
+ */
+void epochToBCDTime(uint64_t timeSec, uint8_t& seconds, uint8_t& minutes,
+                    uint8_t& hours, uint8_t& day, uint8_t& month,
+                    uint16_t& year);
+} // namespace utils
+
+} // namespace responder
+} // namespace pldm
diff --git a/libpldmresponder/utils.cpp b/libpldmresponder/utils.cpp
new file mode 100644
index 0000000..fe23223
--- /dev/null
+++ b/libpldmresponder/utils.cpp
@@ -0,0 +1,51 @@
+#include "utils.hpp"
+
+#include "xyz/openbmc_project/Common/error.hpp"
+
+#include <array>
+#include <ctime>
+#include <iostream>
+#include <map>
+#include <phosphor-logging/elog-errors.hpp>
+#include <stdexcept>
+#include <string>
+#include <vector>
+
+namespace pldm
+{
+using namespace phosphor::logging;
+
+constexpr auto mapperBusName = "xyz.openbmc_project.ObjectMapper";
+constexpr auto mapperPath = "/xyz/openbmc_project/object_mapper";
+constexpr auto mapperInterface = "xyz.openbmc_project.ObjectMapper";
+
+namespace responder
+{
+
+std::string getService(sdbusplus::bus::bus& bus, const std::string& path,
+                       const std::string& interface)
+{
+    using DbusInterfaceList = std::vector<std::string>;
+    std::map<std::string, std::vector<std::string>> mapperResponse;
+
+    try
+    {
+        auto mapper = bus.new_method_call(mapperBusName, mapperPath,
+                                          mapperInterface, "GetObject");
+        mapper.append(path, DbusInterfaceList({interface}));
+
+        auto mapperResponseMsg = bus.call(mapper);
+        mapperResponseMsg.read(mapperResponse);
+    }
+    catch (std::exception& e)
+    {
+        log<level::ERR>("Error in mapper call", entry("ERROR=%s", e.what()),
+                        entry("PATH=%s", path.c_str()),
+                        entry("INTERFACE=%s", interface.c_str()));
+        throw;
+    }
+    return mapperResponse.begin()->first;
+}
+
+} // namespace responder
+} // namespace pldm
diff --git a/libpldmresponder/utils.hpp b/libpldmresponder/utils.hpp
new file mode 100644
index 0000000..d76b716
--- /dev/null
+++ b/libpldmresponder/utils.hpp
@@ -0,0 +1,48 @@
+#pragma once
+
+#include <stdint.h>
+#include <systemd/sd-bus.h>
+
+#include <sdbusplus/server.hpp>
+#include <string>
+
+namespace pldm
+{
+namespace responder
+{
+
+/**
+ *  @brief Get the DBUS Service name for the input dbus path
+ *  @param[in] bus - DBUS Bus Object
+ *  @param[in] path - DBUS object path
+ *  @param[in] interface - DBUS Interface
+ *  @return std::string - the dbus service name
+ */
+std::string getService(sdbusplus::bus::bus& bus, const std::string& path,
+                       const std::string& interface);
+
+/** @brief Convert any Decimal number to BCD
+ *
+ *  @tparam[in] decimal - Decimal number
+ *  @return Corresponding BCD number
+ */
+template <typename T>
+T decimalToBcd(T decimal)
+{
+    T bcd = 0;
+    T rem = 0;
+    auto cnt = 0;
+
+    while (decimal)
+    {
+        rem = decimal % 10;
+        bcd = bcd + (rem << cnt);
+        decimal = decimal / 10;
+        cnt += 4;
+    }
+
+    return bcd;
+}
+
+} // namespace responder
+} // namespace pldm
diff --git a/test/Makefile.am b/test/Makefile.am
index 7211573..ebbf363 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -5,7 +5,9 @@
 check_PROGRAMS = \
 	libpldm_base_test \
 	libpldm_platform_test \
-	libpldmresponder_base_test
+	libpldmresponder_base_test \
+	libpldm_bios_test \
+	libpldmresponder_bios_test
 
 test_cppflags = \
 	-Igtest \
@@ -37,6 +39,27 @@
 	$(CODE_COVERAGE_LIBS)
 libpldm_platform_test_SOURCES = libpldm_platform_test.cpp
 
+libpldm_bios_test_CPPFLAGS = $(test_cppflags)
+libpldm_bios_test_CXXFLAGS = $(test_cxxflags)
+libpldm_bios_test_LDFLAGS = $(test_ldflags)
+libpldm_bios_test_LDADD = \
+	$(top_builddir)/libpldm/libpldm_la-base.o  \
+	$(top_builddir)/libpldm/libpldm_la-bios.o \
+	$(CODE_COVERAGE_LIBS)
+libpldm_bios_test_SOURCES = libpldm_bios_test.cpp
+
+libpldmresponder_bios_test_CPPFLAGS = $(test_cppflags)
+libpldmresponder_bios_test_CXXFLAGS = $(test_cxxflags)
+libpldmresponder_bios_test_LDFLAGS = $(test_ldflags) $(SDBUSPLUS_LIBS)
+libpldmresponder_bios_test_LDADD = \
+	$(top_builddir)/libpldmresponder/libpldmresponder_la-bios.o \
+	$(top_builddir)/libpldmresponder/libpldmresponder_la-utils.o \
+	$(top_builddir)/libpldm/libpldm_la-base.o  \
+	$(top_builddir)/libpldm/libpldm_la-bios.o \
+	$(CODE_COVERAGE_LIBS) $(SDBUSPLUS_LIBS)
+libpldmresponder_bios_test_SOURCES = \
+	libpldmresponder_bios_test.cpp
+
 
 libpldmresponder_base_test_CPPFLAGS = $(test_cppflags)
 libpldmresponder_base_test_CXXFLAGS = $(test_cxxflags)
@@ -46,3 +69,4 @@
 	$(top_builddir)/libpldmresponder/libpldmresponder_la-base.o $(CODE_COVERAGE_LIBS)
 
 libpldmresponder_base_test_SOURCES = libpldmresponder_base_test.cpp
+
diff --git a/test/libpldm_bios_test.cpp b/test/libpldm_bios_test.cpp
new file mode 100644
index 0000000..b1771c9
--- /dev/null
+++ b/test/libpldm_bios_test.cpp
@@ -0,0 +1,118 @@
+#include <string.h>
+
+#include <array>
+
+#include "libpldm/base.h"
+#include "libpldm/bios.h"
+
+#include <gtest/gtest.h>
+
+TEST(GetDateTime, testEncodeRequest)
+{
+    pldm_msg request{};
+    request.body.payload = nullptr;
+    request.body.payload_length = 0;
+
+    auto rc = encode_get_date_time_req(0, &request);
+    ASSERT_EQ(rc, PLDM_SUCCESS);
+}
+
+TEST(GetDateTime, testEncodeResponse)
+{
+    uint8_t completionCode = 0;
+    uint8_t seconds = 50;
+    uint8_t minutes = 20;
+    uint8_t hours = 5;
+    uint8_t day = 23;
+    uint8_t month = 11;
+    uint16_t year = 2019;
+
+    std::array<uint8_t, PLDM_GET_DATE_TIME_RESP_BYTES> responseMsg{};
+    pldm_msg response{};
+
+    response.body.payload = responseMsg.data();
+    response.body.payload_length = responseMsg.size();
+
+    auto rc = encode_get_date_time_resp(0, PLDM_SUCCESS, seconds, minutes,
+                                        hours, day, month, year, &response);
+
+    ASSERT_EQ(rc, PLDM_SUCCESS);
+    ASSERT_EQ(completionCode, response.body.payload[0]);
+
+    ASSERT_EQ(0,
+              memcmp(response.body.payload + sizeof(response.body.payload[0]),
+                     &seconds, sizeof(seconds)));
+    ASSERT_EQ(0, memcmp(response.body.payload +
+                            sizeof(response.body.payload[0]) + sizeof(seconds),
+                        &minutes, sizeof(minutes)));
+    ASSERT_EQ(0,
+              memcmp(response.body.payload + sizeof(response.body.payload[0]) +
+                         sizeof(seconds) + sizeof(minutes),
+                     &hours, sizeof(hours)));
+    ASSERT_EQ(0,
+              memcmp(response.body.payload + sizeof(response.body.payload[0]) +
+                         sizeof(seconds) + sizeof(minutes) + sizeof(hours),
+                     &day, sizeof(day)));
+    ASSERT_EQ(0, memcmp(response.body.payload +
+                            sizeof(response.body.payload[0]) + sizeof(seconds) +
+                            sizeof(minutes) + sizeof(hours) + sizeof(day),
+                        &month, sizeof(month)));
+    ASSERT_EQ(0,
+              memcmp(response.body.payload + sizeof(response.body.payload[0]) +
+                         sizeof(seconds) + sizeof(minutes) + sizeof(hours) +
+                         sizeof(day) + sizeof(month),
+                     &year, sizeof(year)));
+}
+
+TEST(GetDateTime, testDecodeResponse)
+{
+    std::array<uint8_t, PLDM_GET_DATE_TIME_RESP_BYTES> responseMsg{};
+    pldm_msg_payload response{};
+    response.payload = responseMsg.data();
+    response.payload_length = responseMsg.size();
+
+    uint8_t completionCode = 0;
+
+    uint8_t seconds = 55;
+    uint8_t minutes = 2;
+    uint8_t hours = 8;
+    uint8_t day = 9;
+    uint8_t month = 7;
+    uint16_t year = 2020;
+
+    uint8_t retSeconds = 0;
+    uint8_t retMinutes = 0;
+    uint8_t retHours = 0;
+    uint8_t retDay = 0;
+    uint8_t retMonth = 0;
+    uint16_t retYear = 0;
+
+    memcpy(response.payload + sizeof(completionCode), &seconds,
+           sizeof(seconds));
+    memcpy(response.payload + sizeof(completionCode) + sizeof(seconds),
+           &minutes, sizeof(minutes));
+    memcpy(response.payload + sizeof(completionCode) + sizeof(seconds) +
+               sizeof(minutes),
+           &hours, sizeof(hours));
+    memcpy(response.payload + sizeof(completionCode) + sizeof(seconds) +
+               sizeof(minutes) + sizeof(hours),
+           &day, sizeof(day));
+    memcpy(response.payload + sizeof(completionCode) + sizeof(seconds) +
+               sizeof(minutes) + sizeof(hours) + sizeof(day),
+           &month, sizeof(month));
+    memcpy(response.payload + sizeof(completionCode) + sizeof(seconds) +
+               sizeof(minutes) + sizeof(hours) + sizeof(day) + sizeof(month),
+           &year, sizeof(year));
+
+    auto rc = decode_get_date_time_resp(&response, &completionCode, &retSeconds,
+                                        &retMinutes, &retHours, &retDay,
+                                        &retMonth, &retYear);
+
+    ASSERT_EQ(rc, PLDM_SUCCESS);
+    ASSERT_EQ(seconds, retSeconds);
+    ASSERT_EQ(minutes, retMinutes);
+    ASSERT_EQ(hours, retHours);
+    ASSERT_EQ(day, retDay);
+    ASSERT_EQ(month, retMonth);
+    ASSERT_EQ(year, retYear);
+}
diff --git a/test/libpldmresponder_bios_test.cpp b/test/libpldmresponder_bios_test.cpp
new file mode 100644
index 0000000..bcd3e5c
--- /dev/null
+++ b/test/libpldmresponder_bios_test.cpp
@@ -0,0 +1,46 @@
+
+#include "libpldmresponder/bios.hpp"
+
+#include <string.h>
+
+#include <array>
+#include <ctime>
+
+#include "libpldm/base.h"
+#include "libpldm/bios.h"
+
+#include <gtest/gtest.h>
+
+using namespace pldm::responder;
+using namespace pldm::responder::utils;
+
+TEST(epochToBCDTime, testTime)
+{
+    struct tm time
+    {
+    };
+    time.tm_year = 119;
+    time.tm_mon = 3;
+    time.tm_mday = 13;
+    time.tm_hour = 5;
+    time.tm_min = 18;
+    time.tm_sec = 13;
+    time.tm_isdst = -1;
+
+    time_t epochTime = mktime(&time);
+    uint8_t seconds = 0;
+    uint8_t minutes = 0;
+    uint8_t hours = 0;
+    uint8_t day = 0;
+    uint8_t month = 0;
+    uint16_t year = 0;
+
+    epochToBCDTime(epochTime, seconds, minutes, hours, day, month, year);
+
+    ASSERT_EQ(0x13, seconds);
+    ASSERT_EQ(0x18, minutes);
+    ASSERT_EQ(0x5, hours);
+    ASSERT_EQ(0x13, day);
+    ASSERT_EQ(0x4, month);
+    ASSERT_EQ(0x2019, year);
+}
