style: clang-tidy auto fixes (#1528)

Fixes #1527. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2024-07-10 10:35:59 +01:00
committed by GitHub
parent 46bd67a9ec
commit e85f6cd9e4
7 changed files with 14 additions and 7 deletions

View File

@@ -20,13 +20,17 @@
#include "util/TimeUtils.hpp"
#include <gtest/gtest.h>
#include <xrpl/basics/chrono.h>
#include <chrono>
#include <ctime>
TEST(TimeUtilTests, SystemTpFromUTCStrSuccess)
{
auto const tp = util::SystemTpFromUTCStr("2024-01-01T10:50:40Z", "%Y-%m-%dT%H:%M:%SZ");
ASSERT_TRUE(tp.has_value());
auto const time = std::chrono::system_clock::to_time_t(tp.value());
std::tm timeStruct;
std::tm timeStruct{};
gmtime_r(&time, &timeStruct);
EXPECT_EQ(timeStruct.tm_year + 1900, 2024);
EXPECT_EQ(timeStruct.tm_mon, 0);