Use ENCODINGTIME to set the added time, if present, otherwise use the last modified time of the file (only during the first import), fixes #595
This commit is contained in:
@@ -299,18 +299,25 @@ namespace lms::core::stringUtils::tests
|
||||
}
|
||||
}
|
||||
|
||||
TEST(Stringutils, date)
|
||||
TEST(Stringutils, DateToString)
|
||||
{
|
||||
const Wt::WDate date{ 2020, 01, 03 };
|
||||
EXPECT_EQ(toISO8601String(date), "2020-01-03");
|
||||
}
|
||||
|
||||
TEST(Stringutils, dateTime)
|
||||
TEST(Stringutils, DateTimeToString)
|
||||
{
|
||||
const Wt::WDateTime dateTime{ Wt::WDate{ 2020, 01, 03 }, Wt::WTime{ 9, 8, 11, 75 } };
|
||||
EXPECT_EQ(toISO8601String(dateTime), "2020-01-03T09:08:11.075");
|
||||
}
|
||||
|
||||
TEST(Stringutils, DateTimeFromString)
|
||||
{
|
||||
EXPECT_EQ(fromISO8601String("2020-01-03T09:08:11.075"), (Wt::WDateTime{ Wt::WDate{ 2020, 01, 03 }, Wt::WTime{ 9, 8, 11, 75 } }));
|
||||
EXPECT_EQ(fromISO8601String("2020-01-03"), Wt::WDateTime{});
|
||||
EXPECT_EQ(fromISO8601String(""), Wt::WDateTime{});
|
||||
}
|
||||
|
||||
TEST(StringUtils, stringEndsWith)
|
||||
{
|
||||
EXPECT_TRUE(stringEndsWith("FooBar", "Bar"));
|
||||
|
||||
Reference in New Issue
Block a user