Switched the file added info back to a full date time, ref #601
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user