mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user