Commit b7483950 authored by Marcin Siodelski's avatar Marcin Siodelski Committed by Thomas Markwalder
Browse files

[#174,!414] Corrected whitespaces and copyright dates.

As a result of the review.
parent d6af450a
// Copyright (C) 2016-2018 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2016-2019 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
......
// Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2016-2019 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
......@@ -43,8 +43,8 @@ public:
/// @brief Default constructor.
///
/// Sets current universal time as time value.
/// Time resolution is to seconds (i.e no fractional seconds).
/// Sets current universal time as time value.
/// Time resolution is to seconds (i.e no fractional seconds).
HttpDateTime();
/// @brief Construct from @c boost::posix_time::ptime object.
......
// Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2015-2019 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
......@@ -37,9 +37,9 @@ isc::util::durationToText(boost::posix_time::time_duration dur, size_t fsecs_pre
}
width = fsecs_precision;
}
}
s << "." << std::setw(width)
s << "." << std::setw(width)
<< std::setfill('0')
<< fsecs;
}
......
// Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2015-2019 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
......@@ -32,7 +32,7 @@ const size_t DEFAULT_FRAC_SECS=boost::posix_time::time_duration::num_fractional_
/// Zero omits the value.
///
/// @return a string representing time
std::string ptimeToText(boost::posix_time::ptime t,
std::string ptimeToText(boost::posix_time::ptime t,
size_t fsecs_precision = DEFAULT_FRAC_SECS);
/// @brief Converts StatsDuration to text
......
// Copyright (C) 2015-2016 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2015-2019 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
......@@ -30,9 +30,9 @@ TEST(BoostTimeUtilsTest, epoch) {
for (int precision = 0; precision <= DEFAULT_FRAC_SECS; ++precision) {
if (precision == 1) {
expected.push_back('.');
}
}
if (precision >= 1) {
if (precision >= 1) {
expected.push_back('0');
}
......@@ -42,7 +42,7 @@ TEST(BoostTimeUtilsTest, epoch) {
// Expected string should have same precision as default, so
// test the default.
sepoch = ptimeToText(pepoch);
sepoch = ptimeToText(pepoch);
EXPECT_EQ(expected, sepoch);
// Now test a requested precision beyond default. We should
......@@ -64,7 +64,7 @@ TEST(BoostTimeUtilsTest, bastilleDay) {
if (precision == 1) {
expected.push_back('.');
expected.push_back('5');
} else if (precision > 1) {
} else if (precision > 1) {
expected.push_back('0');
}
......@@ -74,7 +74,7 @@ TEST(BoostTimeUtilsTest, bastilleDay) {
// Expected string should have same precision as default, so
// test the default.
sbast = ptimeToText(pbast);
sbast = ptimeToText(pbast);
EXPECT_EQ(expected, sbast);
// Now test a requested precision beyond default. We should
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment