Align day end time as used in the GncDateTime constructor and gnc_dmy2timespec_end

The former was using 23:59:00 while existing code was using 23:59:59. To avoid
disruptions, stick with the latter in our cpp code as well.
This commit is contained in:
Geert Janssens
2017-04-28 16:38:30 +02:00
parent 586b89c6ca
commit 7a037932ae
2 changed files with 2 additions and 2 deletions

View File

@@ -223,7 +223,7 @@ GncDateTimeImpl::GncDateTimeImpl(const GncDateImpl& date, DayPart part) :
using TD = boost::posix_time::time_duration;
static const TD start(0, 0, 0);
static const TD neutral(10, 59, 0);
static const TD end(23,59, 0);
static const TD end(23,59, 59);
TD time_of_day;
switch (part)
{

View File

@@ -236,7 +236,7 @@ TEST(gnc_datetime_constructors, test_gncdate_end_constructor)
const ymd aymd = { 2046, 11, 06 };
GncDateTime atime(GncDate(aymd.year, aymd.month, aymd.day), DayPart::end);
//Skipping timezone information as this can't be controlled.
EXPECT_EQ(atime.format("%d-%m-%Y %H:%M:%S"), "06-11-2046 23:59:00");
EXPECT_EQ(atime.format("%d-%m-%Y %H:%M:%S"), "06-11-2046 23:59:59");
}
TEST(gnc_datetime_constructors, test_gncdate_neutral_constructor)