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:
emeric
2025-01-18 16:51:31 +01:00
parent 5cfbbeca65
commit c73ff7dc03
11 changed files with 65 additions and 8 deletions
+6
View File
@@ -476,6 +476,12 @@ namespace lms::core::stringUtils
return date.toString("yyyy-MM-dd").toUTF8();
}
Wt::WDateTime fromISO8601String(std::string_view dateTime)
{
// assume UTC
return Wt::WDateTime::fromString(Wt::WString{ std::string{ dateTime } }, "yyyy-MM-ddThh:mm:ss.zzz");
}
std::string formatTimestamp(std::chrono::milliseconds timestamp)
{
using namespace std::chrono;