Switched the file added info back to a full date time, ref #601

This commit is contained in:
emeric
2025-01-26 15:08:31 +01:00
parent e553e840d3
commit 814eaf0a3e
12 changed files with 96 additions and 55 deletions
+14 -4
View File
@@ -466,14 +466,24 @@ namespace lms::core::stringUtils
std::string toISO8601String(const Wt::WDateTime& dateTime)
{
// assume UTC
return dateTime.toString("yyyy-MM-ddThh:mm:ss.zzz", false).toUTF8();
if (dateTime.isValid())
{
// assume UTC
return dateTime.toString("yyyy-MM-ddThh:mm:ss.zzz", false).toUTF8();
}
return "";
}
std::string toISO8601String(const Wt::WDate& date)
{
// assume UTC
return date.toString("yyyy-MM-dd").toUTF8();
if (date.isValid())
{
// assume UTC
return date.toString("yyyy-MM-dd").toUTF8();
}
return "";
}
Wt::WDateTime fromISO8601String(std::string_view dateTime)