Toob Player UI

This commit is contained in:
Robin E. R. Davies
2025-06-07 21:52:23 -04:00
parent 82f94cb152
commit 6ea45f46df
29 changed files with 1860 additions and 319 deletions
+11
View File
@@ -39,6 +39,17 @@ std::string HtmlHelper::timeToHttpDate()
return timeToHttpDate(time(nullptr));
}
std::string HtmlHelper::timeToHttpDate(std::filesystem::file_time_type time)
{
// Convert to time_t.
std::chrono::system_clock::time_point system_time = std::chrono::clock_cast<std::chrono::system_clock>(time);
auto time_t_value = std::chrono::system_clock::to_time_t(system_time);
return timeToHttpDate(time_t_value);
}
std::string HtmlHelper::timeToHttpDate(time_t time)
{
// RFC 7231, IMF-fixdate.