Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
b7483950
Commit
b7483950
authored
Jul 24, 2019
by
Marcin Siodelski
Committed by
Thomas Markwalder
Jul 25, 2019
Browse files
[
#174
,
!414
] Corrected whitespaces and copyright dates.
As a result of the review.
parent
d6af450a
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/lib/http/date_time.cc
View file @
b7483950
// Copyright (C) 2016-201
8
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2016-201
9
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
...
...
src/lib/http/date_time.h
View file @
b7483950
// Copyright (C) 2016-201
7
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2016-201
9
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.
...
...
src/lib/util/boost_time_utils.cc
View file @
b7483950
// 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
;
}
...
...
src/lib/util/boost_time_utils.h
View file @
b7483950
// 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
...
...
src/lib/util/tests/boost_time_utils_unittest.cc
View file @
b7483950
// Copyright (C) 2015-201
6
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2015-201
9
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment