mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-29 08:05:50 +00:00
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:
committed by
GitHub
parent
46bd67a9ec
commit
e85f6cd9e4
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user