diff --git a/libpldmresponder/bios.cpp b/libpldmresponder/bios.cpp
index d97229d..1f3d536 100644
--- a/libpldmresponder/bios.cpp
+++ b/libpldmresponder/bios.cpp
@@ -35,11 +35,11 @@
     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
+    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
 }
 
 std::time_t timeToEpoch(uint8_t seconds, uint8_t minutes, uint8_t hours,
@@ -80,34 +80,34 @@
     handlers.emplace(
         PLDM_SET_DATE_TIME,
         [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
-        return this->setDateTime(request, payloadLength);
-    });
+            return this->setDateTime(request, payloadLength);
+        });
     handlers.emplace(
         PLDM_GET_DATE_TIME,
         [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
-        return this->getDateTime(request, payloadLength);
-    });
+            return this->getDateTime(request, payloadLength);
+        });
     handlers.emplace(
         PLDM_GET_BIOS_TABLE,
         [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
-        return this->getBIOSTable(request, payloadLength);
-    });
+            return this->getBIOSTable(request, payloadLength);
+        });
     handlers.emplace(
         PLDM_SET_BIOS_TABLE,
         [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
-        return this->setBIOSTable(request, payloadLength);
-    });
+            return this->setBIOSTable(request, payloadLength);
+        });
     handlers.emplace(
         PLDM_GET_BIOS_ATTRIBUTE_CURRENT_VALUE_BY_HANDLE,
         [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
-        return this->getBIOSAttributeCurrentValueByHandle(request,
-                                                          payloadLength);
-    });
+            return this->getBIOSAttributeCurrentValueByHandle(request,
+                                                              payloadLength);
+        });
     handlers.emplace(
         PLDM_SET_BIOS_ATTRIBUTE_CURRENT_VALUE,
         [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
-        return this->setBIOSAttributeCurrentValue(request, payloadLength);
-    });
+            return this->setBIOSAttributeCurrentValue(request, payloadLength);
+        });
 }
 
 Response Handler::getDateTime(const pldm_msg* request, size_t /*payloadLength*/)
